001 /*
002 * $Id: ValueNotFoundException.java,v 1.4 2013/11/11 13:38:48 oboehm Exp $
003 *
004 * Copyright (c) 2012 by Oliver Boehm
005 *
006 * Licensed under the Apache License, Version 2.0 (the "License");
007 * you may not use this file except in compliance with the License.
008 * You may obtain a copy of the License at
009 *
010 * http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing, software
013 * distributed under the License is distributed on an "AS IS" BASIS,
014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express orimplied.
015 * See the License for the specific language governing permissions and
016 * limitations under the License.
017 *
018 * (c)reated 07.02.2012 by oliver (ob@oasd.de)
019 */
020
021 package patterntesting.runtime.util;
022
023 import java.util.regex.Pattern;
024
025 import patterntesting.runtime.exception.NotFoundException;
026
027 /**
028 * The Class ValueNotFoundException.
029 *
030 * @author oliver (ob@aosd.de)
031 * @since 1.2.10-YEARS (07.02.2012)
032 */
033 //TODO: move to exception package
034 public class ValueNotFoundException extends NotFoundException {
035
036 private static final long serialVersionUID = 20131111L;
037
038 /**
039 * Instantiates a new value not found exception.
040 *
041 * @param msg the msg
042 */
043 public ValueNotFoundException(final String msg) {
044 super(msg);
045 }
046
047 /**
048 * Instantiates a new value not found exception.
049 *
050 * @param value the value
051 */
052 public ValueNotFoundException(final Object value) {
053 super((value instanceof Pattern ? "pattern" : "value") + " \"" + value + "\" not found");
054 }
055
056 }
057