1 | /* |
2 | * Copyright 2006-2007 the original author or authors. |
3 | * |
4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | * you may not use this file except in compliance with the License. |
6 | * You may obtain a copy of the License at |
7 | * |
8 | * http://www.apache.org/licenses/LICENSE-2.0 |
9 | * |
10 | * Unless required by applicable law or agreed to in writing, software |
11 | * distributed under the License is distributed on an "AS IS" BASIS, |
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
13 | * See the License for the specific language governing permissions and |
14 | * limitations under the License. |
15 | */ |
16 | package org.springframework.batch.item.file; |
17 | |
18 | import org.springframework.batch.item.NonTransientResourceException; |
19 | |
20 | /** |
21 | * Exception thrown when errors are encountered with the underlying resource. |
22 | * |
23 | * @author Dave Syer |
24 | */ |
25 | public class NonTransientFlatFileException extends NonTransientResourceException { |
26 | |
27 | private String input; |
28 | |
29 | private int lineNumber; |
30 | |
31 | public NonTransientFlatFileException(String message, String input) { |
32 | super(message); |
33 | this.input = input; |
34 | } |
35 | |
36 | public NonTransientFlatFileException(String message, String input, int lineNumber) { |
37 | super(message); |
38 | this.input = input; |
39 | this.lineNumber = lineNumber; |
40 | } |
41 | |
42 | public NonTransientFlatFileException(String message, Throwable cause, String input, int lineNumber) { |
43 | super(message, cause); |
44 | this.input = input; |
45 | this.lineNumber = lineNumber; |
46 | } |
47 | |
48 | public String getInput() { |
49 | return input; |
50 | } |
51 | |
52 | public int getLineNumber() { |
53 | return lineNumber; |
54 | } |
55 | } |