コード例 #1
0
 internal SharpBoxException(SharpBoxErrorCodes errorCode, Exception innerException, WebRequest request, WebResponse response)
     : base(GetErrorMessage(errorCode), innerException)
 {
     ErrorCode = errorCode;
     PostedRequet = request;
     DisposedReceivedResponse = response;
 }
コード例 #2
0
 internal SharpBoxException(SharpBoxErrorCodes errorCode, Exception innerException, WebRequest request, WebResponse response)
     : base(GetErrorMessage(errorCode), innerException)
 {
     ErrorCode                = errorCode;
     PostedRequet             = request;
     DisposedReceivedResponse = response;
 }
コード例 #3
0
        private static String GetErrorMessage(SharpBoxErrorCodes errorCode)
        {
            // get the key
            String key = errorCode.ToString();

            // Load the value of string value for Client
            try
            {
                return(ErrorMessages.ResourceManager.GetString(key));
            }
            catch (Exception)
            {
                return("n/a");
            }
        }
コード例 #4
0
        private static String GetErrorMessage(SharpBoxErrorCodes errorCode)
        {                                                
            // get the key
            String key = errorCode.ToString();

            // Load the value of string value for Client
            try
            {

                return ErrorMessages.ResourceManager.GetString(key);
            }
            catch (Exception)
            {
                return "n/a";
            }
        }
コード例 #5
0
 /// <summary>
 /// The constructure if the SharpBoxException class. The error code wil
 /// be resolved into an text message automatically
 /// </summary>
 /// <param name="errorCode"></param>
 /// <param name="innerException"></param>
 internal SharpBoxException(SharpBoxErrorCodes errorCode, Exception innerException)
     : this(errorCode, innerException, null, null)
 {
 }
コード例 #6
0
 /// <summary>
 /// The constructure if the SharpBoxException class. The error code wil
 /// be resolved into an text message automatically
 /// </summary>
 /// <param name="errorCode"></param>
 public SharpBoxException(SharpBoxErrorCodes errorCode)
     : this(errorCode, null)
 {
 }
コード例 #7
0
 /// <summary>
 /// The constructure if the SharpBoxException class. The error code wil
 /// be resolved into an text message automatically
 /// </summary>
 /// <param name="errorCode"></param>
 /// <param name="innerException"></param>
 internal SharpBoxException(SharpBoxErrorCodes errorCode, Exception innerException)
     : this(errorCode, innerException, null, null)
 {            
 }
コード例 #8
0
 /// <summary>
 /// The constructure if the SharpBoxException class. The error code wil
 /// be resolved into an text message automatically
 /// </summary>
 /// <param name="errorCode"></param>
 public SharpBoxException(SharpBoxErrorCodes errorCode)
     : this(errorCode, null)
 {                        
 }