|
|
|
|
|
This chapter explains the exceptions thrown by some of the CyberSource .NET Client methods.
Depending on your application needs, you may need to review the value of the exception code to determine how best to handle specific error cases.
This exception is thrown when there is a problem in the code or in the configuration.
BugException has a property called ExceptionCode, which is of type BugExceptionCode.
Table 3 lists the values for BugExceptionCode.
|
BugExceptionCode Value |
Description |
Relevant Properties in the Exception Object |
|---|---|---|
|
An argument passed to a method is null or invalid. |
Message will have the name of the argument. |
|
|
A property is null or invalid, preventing ICSClient from working properly. |
Message will have the description of the problem. |
|
|
The file or stream passed to ICSClients constructor does not contain the correct format. |
InnerException will have the actual exception that occurred. |
|
|
A field in the request is null or invalid. |
Message will have the field name and, if not null, its invalid value. |
|
|
CybsSecurity.dll could not be found. Copy CybsSecurity.dll to the same location where the assembly CyberSource.dll is. If you have an ASP.NET application, this is usually the bin subdirectory. Otherwise, if you application is an executable, this is usually the same directory where the executable file is located. |
InnerException will have the actual exception that occurred. |
|
|
The copy of CybsSecurity.dll is invalid. Contact CyberSource Customer Support for a valid copy. |
InnerException will have the actual exception that occurred. |
This exception is thrown when the loading or saving of the configuration data fails.
ConfigIOException has a property called ExceptionCode, which is of type ConfigIOExceptionCode.
Table 4 lists the values for ConfigIOExceptionCode.
|
ConfigIOExceptionCode Value |
Description |
Relevant Property in the Exception Object |
|---|---|---|
|
An IO error occurred while loading the configuration properties. |
InnerException will have the actual exception that occurred. |
|
|
An IO error occurred while saving the configuration properties. |
InnerException will have the actual exception that occurred. |
This exception is thrown when an exception occurs after the ICS server has received and possibly processed the request. Since the outcome of the transaction is not known when this exception is thrown, you should check the Enterprise Business Center to determine whether the transaction was processed successfully.
CriticalTransactionException has a property called ExceptionCode, which is of type CriticalTransactionExceptionCode.
Table 5 lists the values for CriticalTransactionExceptionCode.
|
CriticalTransactionException-Code Value |
Description |
Relevant Property in the Exception Object |
|---|---|---|
|
An HTTP response other than "200" was returned by the server. |
InnerException will have the actual System.Net.WebException that occurred, whose Response property will have the HttpWebResponse object. |
|
|
The reply received from the server could not be parsed completely. |
Message will have the remaining string in the reply that could not be parsed. |
|
|
An error occurred while parsing the reply received from the server. |
Message will say whether it ran out of memory or parsing failed for some other reason, in which case it will also contain the raw reply received from the server. |
|
|
An error occurred while reading from the Response stream. |
InnerException will have the actual System.IO.IOException that occurred. |
|
|
An error occurred while receiving the reply from the server. |
InnerException will have the actual System.Net.WebException that occurred. |
|
|
The request timed out. |
InnerException will have the actual System.Net.WebException that occurred. |
|
|
An error occurred while transmitting the request and it could not be determined whether or not the server had received the request. |
InnerException will have the actual System.Net.WebException that occurred. |
This exception is thrown when the property ThrowLogException in the Client object is set to yes, and an exception occurred during logging.
The property Message will have the entire text that would have been logged if the exception did not occur. The property InnerException will have the actual exception that occurred.
If an exception was being logged when the LogException occurred, the property ExceptionBeingLogged (of type System.ApplicationException) will have this exception.
NonCriticalTransactionException
This exception is thrown when an exception occurs before the ICS server has received the entire request.
NonCriticalTransactionException has a property called ExceptionCode, which is of type NonCriticalTransactionExceptionCode.
Table 6 lists the values for NonCriticalTransactionExceptionCode.
|
NonCriticalTransaction-ExceptionCode Value |
Description |
Relevant Properties in the Exception Object |
|---|---|---|
|
An error occurred while composing the request. |
Message will say whether it ran out of memory or the composition failed for some other reason. |
|
|
Could not connect to the server. |
InnerException will have the actual System.Net.WebException object. |
|
|
Could not generate a request ID. |
Message will have the description of the problem. InnerException if applicable, will refer to a System.Net.Sockets.SocketException object. |
|
|
An error occurred while obtaining the request stream. |
InnerException will have the actual System.IO.IOException object. |
|
|
An error occurred while loading a key. |
Message will have the full path of the key that failed to load. InnerException will have the actual System.IO.IOException object. |
|
|
Failed to authenticate against the proxy server. |
InnerException will have the actual System.Net.WebException object. |
|
|
An error occurred while connecting to the proxy server. |
InnerException will have the actual System.Net.WebException object. |
|
|
An error occurred while sending the request to the server. |
InnerException will have the actual System.Net.WebException object. |
|
|
An error occurred while writing to the request stream. |
InnerException will have the actual System.Net.WebException object. |
|
|
|
|
|