1 /*
2 * Copyright 2014 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
17 package com.orangesignal.csv.annotation;
18
19 import java.io.IOException;
20
21 /**
22 * この例外は、区切り文字形式のデータ項目の検証操作実行中にエラーが発生したことを示します。
23 *
24 * @author Koji Sugisawa
25 * @since 2.2
26 */
27 public class CsvColumnException extends IOException {
28
29 private static final long serialVersionUID = -4822064613042281469L;
30
31 /**
32 * 原因となったオブジェクトを保持します。
33 */
34 private final Object object;
35
36 /**
37 * 指定された詳細メッセージと原因となったオブジェクトを持つ {@link CsvColumnException} を構築します。
38 *
39 * @param message 詳細メッセージ
40 * @param object 原因となったオブジェクト
41 */
42 public CsvColumnException(final String message, final Object object) {
43 super(message);
44 this.object = object;
45 }
46
47 /**
48 * 原因となったオブジェクトを返します。
49 *
50 * @return 原因となったオブジェクトまたは {@code null}
51 */
52 public Object getObject() {
53 return object;
54 }
55
56 }