/*
 * This file is part of DebGen Biobank Software developed by ASTRID Research.
 * All rights reserved. Reproduction, modification, use or disclosure
 * to third parties without express authority is forbidden.
 *
 * Copyright ASTRID Research Inc., Hungary, 2009-2011.
 *
 * ASTRID Research
 * Headquaters: Csapo utca 42. Debrecen H-4029 HUNGARY
 * Phone: +36-52-533-173        Fax: +36-52-533-174
 * Web: http://www.astrid.hu    E-mail: info@astrid.hu
 *
 * Project name: DebGen Biobank Software project.
 * URLS:
 * Developers: Istvan Zoltan Nagy (istvan.nagy@astrid.hu)
 */
package hu.astrid.debgen.exception;

/**
 * The superclass of exceptions in this projects to handle l10n/i18n related issues
 * @author inagy
 */
public class DebGenException extends Exception {

    protected int type;

    public static final int NORMAL_TYPE = 0;
    public static final int MIDDLE_TYPE = 1;
    public static final int LIST_TYPE = 2;

    public int getType() {
        return type;
    }

    public DebGenException(Throwable cause) {
        super(cause);
        type = 0;
    }

    public DebGenException(String message, Throwable cause) {
        super(message, cause);
        type = 0;
    }

    public DebGenException(String message) {
        super(message);
        type = 0;
    }

    public DebGenException() {
    }

    public String getNormalMessage() {
        return this.getMessage().toUpperCase().replaceAll(" ", "_");
    }
}
