1 11 package org.eclipse.core.internal.indexing; 12 13 import org.eclipse.core.internal.resources.CompatibilityMessages; 14 15 16 public class PageStoreException extends StoreException { 17 public final static int GenericFailure = 0; 18 public final static int CreateFailure = 1; 19 public final static int OpenFailure = 2; 20 public final static int LengthFailure = 3; 21 public final static int WriteFailure = 4; 22 public final static int ReadFailure = 5; 23 public final static int CommitFailure = 6; 24 public final static int IntegrityFailure = 7; 25 public final static int MetadataRequestFailure = 8; 26 public final static int ConversionFailure = 9; 27 28 public final static int LogCreateFailure = 20; 29 public final static int LogOpenFailure = 21; 30 public final static int LogReadFailure = 23; 31 public final static int LogWriteFailure = 24; 32 33 public final static String [] message = new String [30]; 34 35 38 private static final long serialVersionUID = 1L; 39 40 static { 41 initializeMessages(); 42 } 43 44 public int id = 0; 46 public PageStoreException(int id) { 47 this(id, null); 48 } 49 50 public PageStoreException(int id, Throwable exception) { 51 super(message[id], exception); 52 this.id = id; 53 } 54 55 58 private static void initializeMessages() { 59 message[GenericFailure] = CompatibilityMessages.pageStore_genericFailure; 60 message[CreateFailure] = CompatibilityMessages.pageStore_createFailure; 61 message[OpenFailure] = CompatibilityMessages.pageStore_openFailure; 62 message[LengthFailure] = CompatibilityMessages.pageStore_lengthFailure; 63 message[WriteFailure] = CompatibilityMessages.pageStore_writeFailure; 64 message[ReadFailure] = CompatibilityMessages.pageStore_readFailure; 65 message[CommitFailure] = CompatibilityMessages.pageStore_commitFailure; 66 message[IntegrityFailure] = CompatibilityMessages.pageStore_integrityFailure; 67 message[MetadataRequestFailure] = CompatibilityMessages.pageStore_metadataRequestFailure; 68 message[ConversionFailure] = CompatibilityMessages.pageStore_conversionFailure; 69 message[LogCreateFailure] = CompatibilityMessages.pageStore_logCreateFailure; 70 message[LogOpenFailure] = CompatibilityMessages.pageStore_logOpenFailure; 71 message[LogReadFailure] = CompatibilityMessages.pageStore_logReadFailure; 72 message[LogWriteFailure] = CompatibilityMessages.pageStore_logWriteFailure; 73 } 74 } 75 | Popular Tags |