Consider the following scenario:
Imagine a complex scenario in which a stored procedure is called by a client application or from another component that resides on another remote computer.
The stored procedure calls xp_cmdshell
An error happens during the call to xp_cmdshell, and you cannot determine the error.