PH Logo
Logo intepreter modeled after UCB Logo.
/Users/paul/Documents/phlogo/core/Exceptions.h
00001 /*
00002  *  Exceptions.h
00003  *
00004  *  Author: Paul Hamilton
00005  *      Date: 7 Jun 2011
00006  *
00007  */
00008 #ifndef _EXCEPTIONS_H
00009 #define _EXCEPTIONS_H
00010 
00011 #include <boost/exception/all.hpp>
00012 
00013 namespace phlogo {
00014         
00015 typedef boost::error_info<struct bad_tokens_, std::string> errinfo_bad_tokens;
00016 typedef boost::error_info<struct curr_verb_, std::string> errinfo_curr_verb;
00017 typedef boost::error_info<struct name_, std::string> errinfo_name;
00018 struct interpreter_exception : virtual std::exception, virtual boost::exception { };
00019 struct dont_know_how_exception : virtual interpreter_exception { };
00020 struct no_open_function_exception : virtual interpreter_exception { };
00021 struct args_are_variables_exception : virtual interpreter_exception { };
00022 struct not_lit_or_var_exception : virtual interpreter_exception { };
00023 struct func_already_exists_exception : virtual interpreter_exception { };
00024 struct tbd_exception : virtual interpreter_exception { };
00025 struct no_thing_exception : virtual interpreter_exception { };
00026 struct no_word_in_thing_exception : virtual interpreter_exception { };
00027 struct no_list_in_thing_exception : virtual interpreter_exception { };
00028 struct no_array_in_thing_exception : virtual interpreter_exception { };
00029 struct no_list_exception : virtual interpreter_exception { };
00030 struct bad_list_or_array_exception : virtual interpreter_exception { };
00031 struct empty_list_exception : virtual interpreter_exception { };
00032 struct incorrect_list_size_exception : virtual interpreter_exception { };
00033 struct bad_index_exception : virtual interpreter_exception { };
00034 struct no_verb_or_function_exception : virtual interpreter_exception { };
00035 struct bad_expr_exception : virtual interpreter_exception { };
00036 struct bad_testsuite_exception : virtual interpreter_exception { };
00037 
00038 typedef boost::error_info<struct expr_, std::string> errinfo_tag;
00039 typedef boost::error_info<struct value_, std::string> errinfo_value;
00040 struct calc_exception : virtual std::exception, virtual boost::exception { };
00041 struct bad_expression_exception : virtual calc_exception { };
00042 
00043 }
00044 
00045 #endif // _EXCEPTIONS_H
 All Classes Functions