001/* 002 * Copyright 2018 Leibniz-Institut für Analytische Wissenschaften – ISAS – e.V.. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package de.isas.mztab2.io.serialization; 017 018/** 019 * <p> 020 * ElementNameMappingException should be thrown to indicate that the state of 021 * the passed in element did not allow mapping to a proper mzTab name.</p> 022 * 023 * @author nilshoffmann 024 * 025 */ 026public final class ElementNameMappingException extends RuntimeException { 027 028 /** 029 * <p> 030 * Constructor for ElementNameMappingException.</p> 031 * 032 * @param property the property name for the given element. 033 * @param element a {@link java.lang.Object} object. 034 * 035 */ 036 public ElementNameMappingException(String property, Object element) { 037 super( 038 "No mzTab element name mapping available for property '" + property + "' on element '" + element. 039 getClass(). 040 getName() + "' with value '" + element + "'"); 041 } 042 043}