01: /*
02: * $Id: FileFormatException.java,v 1.3 2004/07/08 08:01:29 yuvalo Exp $
03: *
04: * (C) Copyright 2002-2004 by Yuval Oren. All rights reserved.
05: *
06: * Licensed under the Apache License, Version 2.0 (the "License");
07: * you may not use this file except in compliance with the License.
08: * You may obtain a copy of the License at
09: *
10: * http://www.apache.org/licenses/LICENSE-2.0
11: *
12: * Unless required by applicable law or agreed to in writing, software
13: * distributed under the License is distributed on an "AS IS" BASIS,
14: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15: * See the License for the specific language governing permissions and
16: * limitations under the License.
17: */
18:
19: package com.bluecast.io;
20:
21: public class FileFormatException extends java.io.IOException {
22: protected int line;
23: protected int column;
24:
25: public FileFormatException() {
26: this (null);
27: }
28:
29: public FileFormatException(String msg) {
30: this (msg, -1, -1);
31: }
32:
33: public FileFormatException(String msg, int line, int column) {
34: super (msg);
35: this .line = line;
36: this .column = column;
37: }
38:
39: /** Returns the line number of the bad formatting, or -1 if unknown */
40: public int getLine() {
41: return line;
42: }
43:
44: /** Returns the column number of the bad formatting, or -1 if unknown */
45: public int getColumn() {
46: return column;
47: }
48: }
|