Skip to content
Snippets Groups Projects
Select Git revision
  • 3d1a0c2652db131cd502c3948afe2fd186cccbb7
  • master default protected
  • 6.x protected
  • madysson
  • 5.x protected
  • asm
  • time-varying-information-set
  • 4.6 protected
  • dynare_minreal
  • dragonfly
  • various_fixes
  • 4.5 protected
  • clang+openmp
  • exo_steady_state
  • declare_vars_in_model_block
  • julia
  • error_msg_undeclared_model_vars
  • static_aux_vars
  • slice
  • aux_func
  • penalty
  • 6.4 protected
  • 6.3 protected
  • 6.2 protected
  • 6.1 protected
  • 6.0 protected
  • 6-beta2 protected
  • 6-beta1 protected
  • 5.5 protected
  • 5.4 protected
  • 5.3 protected
  • 5.2 protected
  • 5.1 protected
  • 5.0 protected
  • 5.0-rc1 protected
  • 4.7-beta3 protected
  • 4.7-beta2 protected
  • 4.7-beta1 protected
  • 4.6.4 protected
  • 4.6.3 protected
  • 4.6.2 protected
41 results

SigmaeInitialization.cc

Blame
  • dynare_exception.h 1.00 KiB
    // Copyright (C) 2006, Ondra Kamenik
    
    // $Id: dynare_exception.h 853 2006-08-01 08:42:42Z kamenik $
    
    #ifndef DYNARE_EXCEPTION_H
    #define DYNARE_EXCEPTION_H
    
    #include <string>
    
    class DynareException {
    	char* mes;
    public:
    	DynareException(const char* m, const char* fname, int line, int col)
    		{
    			mes = new char[strlen(m) + strlen(fname) + 100];
    			sprintf(mes, "Parse error at %s, line %d, column %d: %s", fname, line, col, m);
    		}
    	DynareException(const char* fname, int line, const std::string& m)
    		{
    			mes = new char[m.size() + strlen(fname) + 50];
    			sprintf(mes, "%s:%d: %s", fname, line, m.c_str());
    		}
    	DynareException(const char* m, int offset)
    		{
    			mes = new char[strlen(m) + 100];
    			sprintf(mes, "Parse error in provided string at offset %d: %s", offset, m);
    		}
    	DynareException(const DynareException& e)
    		: mes(new char[strlen(e.mes)+1])
    		{strcpy(mes, e.mes);}
    	virtual ~DynareException()
    		{delete [] mes;}
    	const char* message() const
    		{return mes;}
    };
    
    #endif
    
    // Local Variables:
    // mode:C++
    // End: