11adf3a94fce500e0bda933e4b495a004d5789bd7Andrey Somov/** 211a89b445f3bde56bf07e6a0d04f0b0256dcb215Andrey Somov * Copyright (c) 2008, http://www.snakeyaml.org 31adf3a94fce500e0bda933e4b495a004d5789bd7Andrey Somov * 41adf3a94fce500e0bda933e4b495a004d5789bd7Andrey Somov * Licensed under the Apache License, Version 2.0 (the "License"); 51adf3a94fce500e0bda933e4b495a004d5789bd7Andrey Somov * you may not use this file except in compliance with the License. 61adf3a94fce500e0bda933e4b495a004d5789bd7Andrey Somov * You may obtain a copy of the License at 71adf3a94fce500e0bda933e4b495a004d5789bd7Andrey Somov * 81adf3a94fce500e0bda933e4b495a004d5789bd7Andrey Somov * http://www.apache.org/licenses/LICENSE-2.0 91adf3a94fce500e0bda933e4b495a004d5789bd7Andrey Somov * 101adf3a94fce500e0bda933e4b495a004d5789bd7Andrey Somov * Unless required by applicable law or agreed to in writing, software 111adf3a94fce500e0bda933e4b495a004d5789bd7Andrey Somov * distributed under the License is distributed on an "AS IS" BASIS, 121adf3a94fce500e0bda933e4b495a004d5789bd7Andrey Somov * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 131adf3a94fce500e0bda933e4b495a004d5789bd7Andrey Somov * See the License for the specific language governing permissions and 141adf3a94fce500e0bda933e4b495a004d5789bd7Andrey Somov * limitations under the License. 159629be70863521bead138c295351f3dec926ab1Andrey Somov */ 169629be70863521bead138c295351f3dec926ab1Andrey Somovpackage org.yaml.snakeyaml.scanner; 179629be70863521bead138c295351f3dec926ab1Andrey Somov 189629be70863521bead138c295351f3dec926ab1Andrey Somovimport org.yaml.snakeyaml.error.Mark; 199629be70863521bead138c295351f3dec926ab1Andrey Somovimport org.yaml.snakeyaml.error.MarkedYAMLException; 209629be70863521bead138c295351f3dec926ab1Andrey Somov 219629be70863521bead138c295351f3dec926ab1Andrey Somov/** 2237f2f1c81f4a5be14db404db4e73f3dca6aa82f2Andrey Somov * Exception thrown by the {@link Scanner} implementations in case of malformed 2337f2f1c81f4a5be14db404db4e73f3dca6aa82f2Andrey Somov * input. 249629be70863521bead138c295351f3dec926ab1Andrey Somov */ 259629be70863521bead138c295351f3dec926ab1Andrey Somovpublic class ScannerException extends MarkedYAMLException { 2637f2f1c81f4a5be14db404db4e73f3dca6aa82f2Andrey Somov 279629be70863521bead138c295351f3dec926ab1Andrey Somov private static final long serialVersionUID = 4782293188600445954L; 289629be70863521bead138c295351f3dec926ab1Andrey Somov 295276a6f69a288c609ad58a2d17423a862d44c9a5scm /** 305276a6f69a288c609ad58a2d17423a862d44c9a5scm * Constructs an instance. 3137f2f1c81f4a5be14db404db4e73f3dca6aa82f2Andrey Somov * 3237f2f1c81f4a5be14db404db4e73f3dca6aa82f2Andrey Somov * @param context 3337f2f1c81f4a5be14db404db4e73f3dca6aa82f2Andrey Somov * Part of the input document in which vicinity the problem 3437f2f1c81f4a5be14db404db4e73f3dca6aa82f2Andrey Somov * occurred. 3537f2f1c81f4a5be14db404db4e73f3dca6aa82f2Andrey Somov * @param contextMark 3637f2f1c81f4a5be14db404db4e73f3dca6aa82f2Andrey Somov * Position of the <code>context</code> within the document. 3737f2f1c81f4a5be14db404db4e73f3dca6aa82f2Andrey Somov * @param problem 3837f2f1c81f4a5be14db404db4e73f3dca6aa82f2Andrey Somov * Part of the input document that caused the problem. 3937f2f1c81f4a5be14db404db4e73f3dca6aa82f2Andrey Somov * @param problemMark 4037f2f1c81f4a5be14db404db4e73f3dca6aa82f2Andrey Somov * Position of the <code>problem</code> within the document. 4137f2f1c81f4a5be14db404db4e73f3dca6aa82f2Andrey Somov * @param note 4237f2f1c81f4a5be14db404db4e73f3dca6aa82f2Andrey Somov * Message for the user with further information about the 4337f2f1c81f4a5be14db404db4e73f3dca6aa82f2Andrey Somov * problem. 445276a6f69a288c609ad58a2d17423a862d44c9a5scm */ 459629be70863521bead138c295351f3dec926ab1Andrey Somov public ScannerException(String context, Mark contextMark, String problem, Mark problemMark, 469629be70863521bead138c295351f3dec926ab1Andrey Somov String note) { 479629be70863521bead138c295351f3dec926ab1Andrey Somov super(context, contextMark, problem, problemMark, note); 489629be70863521bead138c295351f3dec926ab1Andrey Somov } 499629be70863521bead138c295351f3dec926ab1Andrey Somov 505276a6f69a288c609ad58a2d17423a862d44c9a5scm /** 515276a6f69a288c609ad58a2d17423a862d44c9a5scm * Constructs an instance. 5237f2f1c81f4a5be14db404db4e73f3dca6aa82f2Andrey Somov * 5337f2f1c81f4a5be14db404db4e73f3dca6aa82f2Andrey Somov * @param context 5437f2f1c81f4a5be14db404db4e73f3dca6aa82f2Andrey Somov * Part of the input document in which vicinity the problem 5537f2f1c81f4a5be14db404db4e73f3dca6aa82f2Andrey Somov * occurred. 5637f2f1c81f4a5be14db404db4e73f3dca6aa82f2Andrey Somov * @param contextMark 5737f2f1c81f4a5be14db404db4e73f3dca6aa82f2Andrey Somov * Position of the <code>context</code> within the document. 5837f2f1c81f4a5be14db404db4e73f3dca6aa82f2Andrey Somov * @param problem 5937f2f1c81f4a5be14db404db4e73f3dca6aa82f2Andrey Somov * Part of the input document that caused the problem. 6037f2f1c81f4a5be14db404db4e73f3dca6aa82f2Andrey Somov * @param problemMark 6137f2f1c81f4a5be14db404db4e73f3dca6aa82f2Andrey Somov * Position of the <code>problem</code> within the document. 625276a6f69a288c609ad58a2d17423a862d44c9a5scm */ 639629be70863521bead138c295351f3dec926ab1Andrey Somov public ScannerException(String context, Mark contextMark, String problem, Mark problemMark) { 64746cba7ae7ef65c1722bf1ca9cd7decab0178813Andrey Somov this(context, contextMark, problem, problemMark, null); 659629be70863521bead138c295351f3dec926ab1Andrey Somov } 669629be70863521bead138c295351f3dec926ab1Andrey Somov} 67