001/*
002 * jPOS Project [http://jpos.org]
003 * Copyright (C) 2000-2026 jPOS Software SRL
004 *
005 * This program is free software: you can redistribute it and/or modify
006 * it under the terms of the GNU Affero General Public License as
007 * published by the Free Software Foundation, either version 3 of the
008 * License, or (at your option) any later version.
009 *
010 * This program is distributed in the hope that it will be useful,
011 * but WITHOUT ANY WARRANTY; without even the implied warranty of
012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
013 * GNU Affero General Public License for more details.
014 *
015 * You should have received a copy of the GNU Affero General Public License
016 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
017 */
018
019package org.jpos.iso.validator;
020
021import org.jpos.iso.ISOComponent;
022import org.jpos.iso.ISOException;
023
024/**
025 * This type of exception is raised while validating jPOS ISOComponents.
026 * Contains an error component instance referencing to the error.
027 * <p>Title: jPOS</p>
028 * <p>Description: Java Framework for Financial Systems</p>
029 * <p>Copyright: Copyright (c) 2000 jPOS.org.  All rights reserved.</p>
030 * <p>Company: www.jPOS.org</p>
031 * @author Jose Eduardo Leon
032 * @version 1.0
033 */
034public class ISOVException extends ISOException {
035
036    private static final long serialVersionUID = 8609716526640071611L;
037    public ISOVException( String Description ) {
038        super( Description );
039    }
040
041    public ISOVException( String Description, ISOComponent errComponent ) {
042        super( Description );
043        this.errComponent = errComponent;
044    }
045
046    public ISOComponent getErrComponent(){
047        return this.errComponent;
048    }
049
050    public boolean treated() {
051        return treated;
052    }
053
054    public void setErrComponent( ISOComponent c ){
055        this.errComponent = c;
056    }
057
058    public void setTreated( boolean Treated ){
059        treated = Treated;
060    }
061
062    /** flag indicating if the exception was catched in any
063     * try/catch clause. It is used to determine if it is
064     * necessary the replacement of the component by the
065     * iso-error-component in the exception instance**/
066    protected boolean treated = false;
067    protected ISOComponent errComponent;
068}