1 22 23 28 29 package org.xquark.mapper; 30 31 import org.xml.sax.Locator ; 32 33 38 public class StorageException extends RepositoryException implements Locator 39 { 40 private static final String RCSRevision = "$Revision: 1.1 $"; 41 private static final String RCSName = "$Name: $"; 42 private int line; 43 private int column; 44 private String systemID; 45 private String publicID; 46 47 53 public StorageException(int code, String message) 54 { 55 super(code, message); 56 } 57 58 62 public StorageException(RepositoryException exception) 63 { 64 super(exception.getCode(), exception.getMessage(), exception.getException()); 65 } 66 67 73 public StorageException(RepositoryException exception, Locator locator) 74 { 75 this(exception); 76 setLocator(locator); 77 } 78 79 86 public StorageException(int code, String message, Exception underlyingException) 87 { 88 super(code, message, underlyingException); 89 } 90 99 public StorageException(int code, String message, Exception underlyingException, Locator locator) 100 { 101 super(code, message, underlyingException); 102 setLocator(locator); 103 } 104 105 109 public void setLocator(Locator locator) 110 { 111 line = locator.getLineNumber(); 112 column = locator.getColumnNumber(); 113 systemID = locator.getSystemId(); 114 publicID = locator.getPublicId(); 115 } 116 117 128 public String getPublicId() 129 { 130 return publicID; 131 } 132 133 144 public String getSystemId() 145 { 146 return systemID; 147 } 148 149 164 public int getLineNumber() 165 { 166 return line; 167 } 168 169 184 public int getColumnNumber() 185 { 186 return column; 187 } 188 189 } 190 | Popular Tags |