/******************************************************************************
    Copyright (c) 1996-2000 Synopsys, Inc.    ALL RIGHTS RESERVED

The following code is derived, directly or indirectly, from the SystemC
source code released by Synopsys, Inc Copyright (c) 1996-2001, Synopsys,
Inc., CoWare, Inc., Frontier Design, Inc. and others. All Rights reserved.
The contents of this file are subject to the restrictions and limitations
set forth in the SystemC Open Source License Version 2.0 (the "License");
You may not use this file except in compliance with such restrictions and
limitations. You may obtain instructions on how to receive a copy of the
License at http://www.systemc.org/.  Software distributed by Contributors
under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
ANY KIND, either express or implied. See the License for the specific
language governing rights and limitations under the License."

******************************************************************************/

/******************************************************************************

    sc_err_handler.h -- Provide flexible error reporting / user debugging

    Original Author: Stan Y. Liao. Synopsys, Inc. (stanliao@synopsys.com)

******************************************************************************/

/******************************************************************************

    MODIFICATION LOG - modifiers, enter your name, affliation and
    changes you are making here:

    Modifier Name & Affiliation:
    Description of Modification:
    

******************************************************************************/

#ifndef SC_ERR_HANDLER_H
#define SC_ERR_HANDLER_H

#include "sc_iostream.h"

extern ostream& sc_err;

enum sc_err_enum {
    SC_ERR_ARRAY_BOUND,
    SC_ERR_ARRAY_LENGTH,
    SC_ERR_PARAMETER,
    SC_ERR_LAMBDA,
    SC_ERR_SC_LOGIC,
    SC_ERR_WAIT,
    SC_ERR_WATCHING
};

typedef void (*sc_err_handler)(sc_err_enum);

extern sc_err_handler sc_set_handler(sc_err_enum, sc_err_handler);
extern void sc_call_handler(sc_err_enum, const char*, int sev = -1);

#endif
