1 28 29 package com.caucho.config; 30 31 import com.caucho.util.LineCompileException; 32 33 36 public class LineConfigException extends ConfigException 37 implements LineCompileException, LineException 38 { 39 private String _filename; 40 private int _line = -1; 41 42 45 public LineConfigException() 46 { 47 } 48 49 52 public LineConfigException(String msg) 53 { 54 super(msg); 55 } 56 57 60 public LineConfigException(String msg, Throwable cause) 61 { 62 super(msg, cause); 63 } 64 65 68 public LineConfigException(Throwable cause) 69 { 70 super(cause); 71 } 72 73 public LineConfigException(String filename, int line, String message) 74 { 75 super(filename + ":" + line + ": " + message); 76 77 _filename = filename; 78 _line = line; 79 } 80 81 public LineConfigException(String filename, int line, Throwable cause) 82 { 83 super(filename + ":" + line + ": " + cause.getMessage(), cause); 84 85 _filename = filename; 86 _line = line; 87 } 88 89 public LineConfigException(String filename, int line, 90 String message, Throwable cause) 91 { 92 super(filename + ":" + line + ": " + message, cause); 93 94 _filename = filename; 95 _line = line; 96 } 97 98 public String getFilename() 99 { 100 return _filename; 101 } 102 103 public int getLineNumber() 104 { 105 return _line; 106 } 107 108 public String toString() 109 { 110 return getMessage(); 111 } 112 } 113 | Popular Tags |