1 /* This file is part of Shapes.
3 * Shapes is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 3 of the License, or
8 * Shapes is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with Shapes. If not, see <http://www.gnu.org/licenses/>.
16 * Copyright 2008 Henrik Tidefelt
21 #include "functiontypes.h"
22 #include "shapesexceptions.h"
29 class ErrorHandler
: public Lang::Function
33 virtual ~ErrorHandler( );
34 virtual bool isTransforming( ) const;
35 virtual void gcMark( Kernel::GCMarkedSet
& marked
){ };
39 class ExceptionWrapper
: public Lang::ErrorHandler
45 ExceptionWrapper( const char * _title
, const char * _msg
);
46 virtual ~ExceptionWrapper( );
47 virtual void call( Kernel::EvalState
* evalState
, Kernel::Arguments
& args
, const Ast::SourceLocation
& callLoc
) const;
55 Shapes::Lang::ExceptionWrapper
< T
>::ExceptionWrapper( const char * _title
, const char * _msg
)
56 : title( _title
), msg( _msg
)
60 Shapes::Lang::ExceptionWrapper
< T
>::~ExceptionWrapper( )
65 Shapes::Lang::ExceptionWrapper
< T
>::call( Kernel::EvalState
* evalState
, Kernel::Arguments
& args
, const Ast::SourceLocation
& callLoc
) const