< prev index next >

src/java.base/share/classes/java/text/ParseException.java

Print this page




  33  * and Sun. This technology is protected by multiple US and International
  34  * patents. This notice and attribution to Taligent may not be removed.
  35  *   Taligent is a registered trademark of Taligent, Inc.
  36  *
  37  */
  38 
  39 package java.text;
  40 
  41 /**
  42  * Signals that an error has been reached unexpectedly
  43  * while parsing.
  44  * @see java.lang.Exception
  45  * @see java.text.Format
  46  * @see java.text.FieldPosition
  47  * @author      Mark Davis
  48  * @since 1.1
  49  */
  50 public
  51 class ParseException extends Exception {
  52 

  53     private static final long serialVersionUID = 2703218443322787634L;
  54 
  55     /**
  56      * Constructs a ParseException with the specified detail message and
  57      * offset.
  58      * A detail message is a String that describes this particular exception.
  59      *
  60      * @param s the detail message
  61      * @param errorOffset the position where the error is found while parsing.
  62      */
  63     public ParseException(String s, int errorOffset) {
  64         super(s);
  65         this.errorOffset = errorOffset;
  66     }
  67 
  68     /**
  69      * Returns the position where the error was found.
  70      *
  71      * @return the position where the error was found
  72      */


  33  * and Sun. This technology is protected by multiple US and International
  34  * patents. This notice and attribution to Taligent may not be removed.
  35  *   Taligent is a registered trademark of Taligent, Inc.
  36  *
  37  */
  38 
  39 package java.text;
  40 
  41 /**
  42  * Signals that an error has been reached unexpectedly
  43  * while parsing.
  44  * @see java.lang.Exception
  45  * @see java.text.Format
  46  * @see java.text.FieldPosition
  47  * @author      Mark Davis
  48  * @since 1.1
  49  */
  50 public
  51 class ParseException extends Exception {
  52 
  53     @java.io.Serial
  54     private static final long serialVersionUID = 2703218443322787634L;
  55 
  56     /**
  57      * Constructs a ParseException with the specified detail message and
  58      * offset.
  59      * A detail message is a String that describes this particular exception.
  60      *
  61      * @param s the detail message
  62      * @param errorOffset the position where the error is found while parsing.
  63      */
  64     public ParseException(String s, int errorOffset) {
  65         super(s);
  66         this.errorOffset = errorOffset;
  67     }
  68 
  69     /**
  70      * Returns the position where the error was found.
  71      *
  72      * @return the position where the error was found
  73      */
< prev index next >