home *** CD-ROM | disk | FTP | other *** search
/ Apple Developer Connection Student Program / ADC Tools Sampler CD Disk 3 1999.iso / Metrowerks CodeWarrior / Java Support / Java_Source / IFC_112 / netscape / util / DeserializationException.java < prev    next >
Encoding:
Text File  |  1999-05-28  |  1.0 KB  |  36 lines  |  [TEXT/CWIE]

  1. // DeserializationException.java
  2. // By Ned Etcode
  3. // Copyright 1995, 1996, 1997 Netscape Communications Corp.  All rights reserved.
  4.  
  5. package netscape.util;
  6.  
  7. /** Exception signaling an exceptional condition during deserialization.  This
  8.   * exception also provides a means for a Deserializer client to determine
  9.   * which line generated the exception.
  10.   */
  11. public class DeserializationException extends Exception {
  12.     int lineNumber = -1;
  13.  
  14.     /** Constructs an empty DeserializationException.
  15.       */
  16.     private DeserializationException() {
  17.         super();
  18.     }
  19.  
  20.     /** Constructs a DeserializationException with the descriptive message
  21.       * <b>string</b> and <b>lineNumber</b>, the line number on which
  22.       * the error occurred.
  23.       */
  24.     public DeserializationException(String string, int lineNumber) {
  25.         super(string);
  26.         this.lineNumber = lineNumber;
  27.     }
  28.  
  29.     /** Returns the line number at which the DeserializationException
  30.       * occurred.
  31.       */
  32.     public int lineNumber() {
  33.         return lineNumber;
  34.     }
  35. }
  36.