AsperaErrorCodes
using System.Collections.Generic;
namespace Relativity.Transfer.Aspera
{
internal static class AsperaErrorCodes
{
public const int NoError = 0;
public const int GenericFaspProtocolError = 1;
public const int GenericAscpError = 2;
public const int AmbiguousTargerError = 3;
public const int NoSuchFileError = 4;
public const int NoPermissionsError = 5;
public const int NotDirectoryError = 6;
public const int IsDirectoryError = 7;
public const int UsageError = 8;
public const int LicenseDuplicateError = 9;
public const int LicenseRateExceededError = 10;
public const int InternalError = 11;
public const int TransferError = 12;
public const int TransferTimeoutError = 13;
public const int ConnectionError = 14;
public const int ConnectionTimeoutError = 15;
public const int ConnectionLostError = 16;
public const int ReceiverSendError = 17;
public const int ReceiverReceiveError = 18;
public const int AuthenticationError = 19;
public const int NothingError = 20;
public const int NotRegularError = 21;
public const int FileTableOverflowError = 22;
public const int TooManyFilesOpenError = 23;
public const int FileTooBigError = 24;
public const int NoSpaceLeftError = 25;
public const int ReadOnlyFileSystemError = 26;
public const int SomeFilesError = 27;
public const int UserCancelError = 28;
public const int LicenseNotFoundError = 29;
public const int LicenseExpiredError = 30;
public const int SocketSetupError = 31;
public const int OutOfMemoryError = 32;
public const int ThreadSpawnError = 33;
public const int = 34;
public const int DiskReadError = 35;
public const int DiskWriteError = 36;
public const int AuthorizationError = 37;
public const int LicenseIllegalError = 38;
public const int PeerAbortedSessionError = 39;
public const int DataTransferTimeoutError = 40;
public const int BadPathError = 41;
public const int AlreadyExistsError = 42;
public const int StatFailsError = 43;
public const int UdpInitiationError = 44;
public const int BandwidthMeasurementError = 45;
public const int VLinkError = 46;
public const int HttpConnectionError = 47;
public const int FileEncryptionError = 48;
public const int FileDecryptionError = 49;
public const int BadConfigurationError = 50;
public const int InsecureConnectionError = 51;
public const int StartValidationError = 52;
public const int StopValidationError = 53;
public const int ThresholdValidationError = 54;
public const int FilePathTooLongError = 55;
public const int IllegalCharsInPathError = 56;
public const int UndefinedError = 57;
private static readonly IReadOnlyDictionary<int, string> ErrorCodes = new Dictionary<int, string> {
{
0,
"NoError"
},
{
1,
"GenericFaspProtocolError"
},
{
2,
"GenericAscpError"
},
{
3,
"AmbiguousTargetError"
},
{
4,
"NoSuchFileError"
},
{
5,
"NoPermissionsError"
},
{
6,
"NotDirectoryError"
},
{
7,
"IsDirectoryError"
},
{
8,
"UsageError"
},
{
9,
"LicenseDuplicateError"
},
{
10,
"LicenseRateExceededError"
},
{
11,
"InternalError"
},
{
12,
"TransferError"
},
{
13,
"TransferTimeoutError"
},
{
14,
"ConnectionError"
},
{
15,
"ConnectionTimeoutError"
},
{
16,
"ConnectionLostError"
},
{
17,
"ReceiverSendError"
},
{
18,
"ReceiverReceiveError"
},
{
19,
"AuthenticationError"
},
{
20,
"NothingError"
},
{
21,
"NotRegularError"
},
{
22,
"FileTableOverflowError"
},
{
23,
"TooManyFilesOpenError"
},
{
24,
"FileTooBigError"
},
{
25,
"NoSpaceLeftError"
},
{
26,
"ReadOnlyFileSystemError"
},
{
27,
"SomeFilesError"
},
{
28,
"UserCancelError"
},
{
29,
"LicenseNotFoundError"
},
{
30,
"LicenseExpiredError"
},
{
31,
"SocketSetupError"
},
{
32,
"OutOfMemoryError"
},
{
33,
"ThreadSpawnError"
},
{
34,
"UnauthorizedError"
},
{
35,
"DiskReadError"
},
{
36,
"DiskWriteError"
},
{
37,
"AuthorizationError"
},
{
38,
"LicenseIllegalError"
},
{
39,
"PeerAbortedSessionError"
},
{
40,
"DataTransferTimeoutError"
},
{
41,
"BadPathError"
},
{
42,
"AlreadyExistsError"
},
{
43,
"StatFailsError"
},
{
44,
"UdpInitiationError"
},
{
45,
"BandwidthMeasurementError"
},
{
46,
"VLinkError"
},
{
47,
"HttpConnectionError"
},
{
48,
"FileEncryptionError"
},
{
49,
"FileDecryptionError"
},
{
50,
"BadConfigurationError"
},
{
51,
"InsecureConnectionError"
},
{
52,
"StartValidationError"
},
{
53,
"StopValidationError"
},
{
54,
"ThresholdValidationError"
},
{
55,
"FilePathTooLongError"
},
{
56,
"IllegalCharsInPathError"
},
{
57,
"UndefinedError"
}
};
public static string GetExplanation(int code)
{
if (!ErrorCodes.ContainsKey(code))
return "UnknownAsperaErrorCode";
return ErrorCodes[code];
}
}
}