Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/share/classes/java/text/ParseException.java
38829 views
/*1* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425/*26* (C) Copyright Taligent, Inc. 1996, 1997 - All Rights Reserved27* (C) Copyright IBM Corp. 1996 - 1998 - All Rights Reserved28*29* The original version of this source code and documentation is copyrighted30* and owned by Taligent, Inc., a wholly-owned subsidiary of IBM. These31* materials are provided under terms of a License Agreement between Taligent32* and Sun. This technology is protected by multiple US and International33* patents. This notice and attribution to Taligent may not be removed.34* Taligent is a registered trademark of Taligent, Inc.35*36*/3738package java.text;3940/**41* Signals that an error has been reached unexpectedly42* while parsing.43* @see java.lang.Exception44* @see java.text.Format45* @see java.text.FieldPosition46* @author Mark Davis47*/48public49class ParseException extends Exception {5051private static final long serialVersionUID = 2703218443322787634L;5253/**54* Constructs a ParseException with the specified detail message and55* offset.56* A detail message is a String that describes this particular exception.57*58* @param s the detail message59* @param errorOffset the position where the error is found while parsing.60*/61public ParseException(String s, int errorOffset) {62super(s);63this.errorOffset = errorOffset;64}6566/**67* Returns the position where the error was found.68*69* @return the position where the error was found70*/71public int getErrorOffset () {72return errorOffset;73}7475//============ privates ============76/**77* The zero-based character offset into the string being parsed at which78* the error was found during parsing.79* @serial80*/81private int errorOffset;82}838485