1 /*
2 * Copyright 2007 Kasper B. Graversen
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.supercsv.exception;
17
18 import org.supercsv.cellprocessor.ift.CellProcessor;
19 import org.supercsv.util.CsvContext;
20
21 /**
22 * Exception thrown by CellProcessors when constraint validation fails.
23 * <p>
24 * Prior to 2.0.0, there was no way to distinguish between constraint validation failures and other exceptions thrown
25 * during CellProcessor execution - this class exists for that purpose.
26 *
27 * @author James Bassett
28 * @since 2.0.0
29 */
30 public class SuperCsvConstraintViolationException extends SuperCsvCellProcessorException {
31
32 private static final long serialVersionUID = 1L;
33
34 /**
35 * Constructs a new <tt>SuperCsvConstraintViolationException</tt>.
36 *
37 * @param msg
38 * the exception message
39 * @param context
40 * the CSV context
41 * @param processor
42 * the cell processor that was executing
43 */
44 public SuperCsvConstraintViolationException(final String msg, final CsvContext context,
45 final CellProcessor processor) {
46 super(msg, context, processor);
47 }
48
49 /**
50 * Constructs a new <tt>SuperCsvConstraintViolationException</tt>.
51 *
52 * @param msg
53 * the exception message
54 * @param context
55 * the CSV context
56 * @param processor
57 * the cell processor that was executing
58 * @param t
59 * the nested exception
60 */
61 public SuperCsvConstraintViolationException(final String msg, final CsvContext context,
62 final CellProcessor processor, final Throwable t) {
63 super(msg, context, processor, t);
64 }
65
66 }