1 23 24 28 50 package com.sun.jts.CosTransactions; 51 52 60 67 class LogException extends Throwable { 68 69 71 static final int LOG_SUCCESS = 0; 72 static final int LOG_NOT_INITIALISED = 1; 73 static final int LOG_OPEN_FAILURE = 2; 74 static final int LOG_READ_FAILURE = 3; 75 static final int LOG_CORRUPTED = 4; 76 static final int LOG_INVALID_FILE_DESCRIPTOR = 5; 77 static final int LOG_LOCK_FAILURE = 6; 78 static final int LOG_WRITE_FAILURE = 7; 79 static final int LOG_CLOSE_FAILURE = 8; 80 static final int LOG_TOO_MANY_INPUT_BUFFERS = 9; 81 static final int LOG_RECORD_TOO_LARGE = 10; 82 static final int LOG_NO_SPACE = 11; 83 static final int LOG_INSUFFICIENT_MEMORY = 12; 84 static final int LOG_ERROR_FORCING_LOG = 13; 85 static final int LOG_INVALID_LSN = 14; 86 static final int LOG_NEW_TAIL_TOO_HIGH = 15; 87 static final int LOG_NEW_TAIL_TOO_LOW = 16; 88 static final int LOG_INVALID_TAIL = 17; 89 static final int LOG_INTERNAL_ERROR = 18; 90 static final int LOG_NO_RESTART_RECORD = 19; 91 static final int LOG_INVALID_CURSOR = 20; 92 static final int LOG_END_OF_CURSOR = 21; 93 static final int LOG_ACCESS_FAILURE = 22; 94 static final int LOG_INVALID_PROCESS = 23; 95 static final int LOG_INVALID_RECORDTYPE = 24; 96 static final int LOG_INVALID_WRITEMODE = 25; 97 static final int LOG_OPEN_EXTENT_FAILURE = 26; 98 static final int LOG_READ_ONLY_ACCESS = 27; 99 static final int MAX_RESPONSE_VALUE = LOG_READ_ONLY_ACCESS; 100 101 103 private static final String [] statusStrings = 104 { "LOG-000: Operation successful", 105 "LOG-001: Log not initialised", 106 "LOG-002: Open failure", 107 "LOG-003: Read failure", 108 "LOG-004: Data corrupted", 109 "LOG-005: Invalid file descriptor", 110 "LOG-006: Lock failure", 111 "LOG-007: Write failure", 112 "LOG-008: Close failure", 113 "LOG-009: Too many input buffers", 114 "LOG-010: Record too large", 115 "LOG-011: No space in filesystem", 116 "LOG-012: Insufficient memory", 117 "LOG-013: Force failure", 118 "LOG-014: Invalid LSN value", 119 "LOG-015: New tail LSN too high", 120 "LOG-016: New tail LSN too low", 121 "LOG-017: Invalid tail LSN value", 122 "LOG-018: Internal error", 123 "LOG-019: No restart record present", 124 "LOG-020: Invalid cursor value", 125 "LOG-021: End of cursor reached", 126 "LOG-022: Filesystem access failure", 127 "LOG-023: Invalid process", 128 "LOG-024: Log is read only", 129 "LOG-025: Invalid record type specified", 130 "LOG-026: Extent file open failure", 131 "LOG-027: Invalid write mode specified", 132 "LOG-028: Invalid status specified" }; 133 134 136 int errorCode; 137 private int throwPoint; 138 private Object extraInfo; 139 140 150 LogException(Object dummy , 151 int err, 152 int point ) { 153 super(new String ("Log exception at point "+point+":\n"+ 154 statusStrings[err>MAX_RESPONSE_VALUE?MAX_RESPONSE_VALUE+1:err])); 155 errorCode = err; 156 throwPoint = point; 157 } 158 159 170 LogException(Object dummy , 171 int err, 172 int point, 173 Object extra ) { 174 super(new String ("Log exception at point "+point+":\n"+ 175 statusStrings[err>MAX_RESPONSE_VALUE?MAX_RESPONSE_VALUE+1:err])); 176 errorCode = err; 177 throwPoint = point; 178 extraInfo = extra; 179 } 180 } 181 | Popular Tags |