1 /* 2 * Copyright 2012 Christopher Pheby 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.jadira.cdt.phonenumber.api; 17 18 import org.jadira.cdt.exception.WrappedRuntimeException; 19 20 import com.google.i18n.phonenumbers.NumberParseException; 21 22 /** 23 * Represents an error caused during the parsing of a phone number. 24 */ 25 public class PhoneNumberParseException extends WrappedRuntimeException { 26 27 private static final long serialVersionUID = -24876358310884916L; 28 29 /** 30 * Creates a new instance for the given {@link NumberParseException} 31 * @param message The exception's message 32 * @param e The causing exception 33 */ 34 public PhoneNumberParseException(String message, NumberParseException e) { 35 super(message, e); 36 } 37 38 /** 39 * Creates a new instance with the given message 40 * @param message The exception's message 41 */ 42 public PhoneNumberParseException(String message) { 43 super(message); 44 } 45 }