View Javadoc
1   package com.opencsv.exceptions;
2   
3   /**
4    * This exception is thrown on initiation of field mapping if
5    * {@link com.opencsv.bean.CsvRecurse} has been improperly used.
6    *
7    * @author Andrew Rucker Jones
8    * @since 5.0
9    */
10  public class CsvRecursionException extends CsvRuntimeException {
11      private static final long serialVersionUID = 1L;
12  
13      private final Class<?> offendingType;
14  
15      /**
16       * Constructor for an error message and the type that caused a recursion
17       * problem.
18       *
19       * @param message A human-readable error message
20       * @param offendingType The type that is misconfigured and caused the error
21       */
22      public CsvRecursionException(String message, Class<?> offendingType) {
23          super(message);
24          this.offendingType = offendingType;
25      }
26  
27      /**
28       * @return The type that is misconfigured and caused the error
29       */
30      public Class<?> getOffendingType() {
31          return offendingType;
32      }
33  }