ConversionException.java

  1. package com.gh.mygreen.xlsmapper.cellconverter;

  2. import com.gh.mygreen.xlsmapper.XlsMapperException;


  3. /**
  4.  * Conversionで致命的なエラーが発生したときにスローされる例外。
  5.  * @author T.TSUCHIE
  6.  *
  7.  */
  8. public class ConversionException extends XlsMapperException {
  9.    
  10.     /** serialVersionUID */
  11.     private static final long serialVersionUID = 1L;
  12.    
  13.     private final Class<?> targetType;
  14.    
  15.     public ConversionException(final String message, final Class<?> targetType) {
  16.         super(message);
  17.         this.targetType = targetType;
  18.     }
  19.    
  20.     public ConversionException(final String message, final Throwable ex, final Class<?> targetType) {
  21.         super(message, ex);
  22.         this.targetType = targetType;
  23.     }
  24.    
  25.     public Class<?> getTargetType() {
  26.         return targetType;
  27.     }
  28.    
  29. }