KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > etymon > pjx > PdfException


1 /*
2   Copyright (C) Etymon Systems, Inc. <http://www.etymon.com/>
3 */

4
5 package com.etymon.pjx;
6
7 /**
8    The superclass of all exceptions within this package.
9    @author Nassib Nassar
10 */

11 public class PdfException
12     extends Exception JavaDoc {
13     
14     /**
15        The position where the error was found, or -1 if no
16        position information is available.
17     */

18     private long _offset;
19     
20     /**
21        Creates a PdfException with a detailed message.
22        @param s the detailed message.
23     */

24     public PdfException(String JavaDoc s) {
25         super(s);
26         _offset = -1;
27     }
28     
29     /**
30        Creates a PdfException with a detailed message and offset.
31        A detailed message is a String that describes this
32        particular exception.
33        @param s the detailed message.
34        @param offset the position where the error is found.
35     */

36     public PdfException(String JavaDoc s, long offset) {
37         super(s);
38         _offset = offset;
39     }
40
41     
42     /**
43        Returns the position where the error was found.
44        @return the position where the error was found or -1 if no
45        position information is available.
46     */

47     public long getOffset() {
48         return _offset;
49     }
50
51 }
52
Popular Tags