01: /*
02: * This file or a portion of this file is licensed under the terms of
03: * the Globus Toolkit Public License, found in file GTPL, or at
04: * http://www.globus.org/toolkit/download/license.html. This notice must
05: * appear in redistributions of this file, with or without modification.
06: *
07: * Redistributions of this Software, with or without modification, must
08: * reproduce the GTPL in: (1) the Software, or (2) the Documentation or
09: * some other similar material which is provided with the Software (if
10: * any).
11: *
12: * Copyright 1999-2004 University of Chicago and The University of
13: * Southern California. All rights reserved.
14: */
15: package org.griphyn.common.util;
16:
17: /**
18: * This class is used to signal errors while parsing profile strings
19: * @see ProfileParser
20: *
21: * @author Gaurang Mehta
22: * @author Jens-S. Vöckler
23: * @version $Revision: 50 $
24: */
25: public class ProfileParserException extends Exception {
26: /**
27: * Remembers the position that cause the exception to be thrown.
28: */
29: private int m_position;
30:
31: public ProfileParserException(String msg, int position) {
32: super (msg);
33: m_position = position;
34: }
35:
36: public ProfileParserException(String msg, int position,
37: Throwable cause) {
38: super (msg, cause);
39: m_position = position;
40: }
41:
42: /**
43: * Obtains the position at which point the exception was thrown.
44: * @return a column position into the string
45: */
46: public int getPosition() {
47: return this.m_position;
48: }
49: }
|