9 #include <boost/make_shared.hpp>
10 #include <boost/lexical_cast.hpp>
25 static std::string message(1024,
' ');
30 std::ostringstream converter;
32 converter << std::endl << std::endl;
33 converter <<
"--------------------------------------------------------" << std::endl;
34 converter <<
"User Error: ";
37 converter <<
"\n** Diagnosting info **\n" ;
38 converter << boost::diagnostic_information_what( *
this );
41 converter <<
"--------------------------------------------------------" << std::endl;
43 message = converter.str();
44 return message.c_str();
46 }
catch (std::exception &exc) {
47 std::cerr <<
"*** Exception encountered in exception handling routines ***" << std::endl <<
"*** Message is " << std::endl
48 << exc.what() << std::endl <<
"*** Aborting! ***" << std::endl;
52 std::cerr <<
"*** Exception encountered in exception handling routines ***" << std::endl <<
"*** Aborting! ***"
71 data_->root_type_ =
nullptr;
73 data_->parent_ =
nullptr;
74 data_->descendant_order_ = 0;
83 THROW( ExcAddressNullPointer() << EI_AccessorName(
"storage_root") );
85 THROW( ExcAddressNullPointer() << EI_AccessorName(
"type_root") );
87 data_->root_type_ = type_root;
88 data_->root_storage_ = storage_root;
89 data_->parent_ =
nullptr;
90 data_->descendant_order_ = 0;
91 data_->actual_storage_ = storage_root;
105 addr->
data_->descendant_order_ = idx;
106 addr->
data_->actual_storage_ =
data_->actual_storage_->get_item(idx);
115 while (address_data->
parent_ != NULL) {
117 address_data = address_data->
parent_;
121 if (path.size() == 0) {
127 std::string address =
"";
128 int i = path.size()-1;
134 storage = storage->
get_item(path[i]);
137 address = address +
"/" + it->key_;
138 input_type = it->type_.get();
147 storage = storage->
get_item(path[i]);
149 address = address +
"/" + boost::lexical_cast<std::string>(path[i]);
166 : record_type_(), address_(
Address() )
172 : record_type_(rec.record_type_), address_(rec.address_)
178 : record_type_(type), address_(address)
181 THROW( ExcAccessorForNullStorage() << EI_AccessorName(
"Record") );
203 : record_type_(), address_(
Address() )
209 : record_type_(rec.record_type_), address_(rec.address_)
215 : record_type_(type), address_(address)
218 THROW( ExcAccessorForNullStorage() << EI_AccessorName(
"AbstractRecord") );
224 {
return Record(address_,type()); }
252 : array_type_(Type::Bool()), address_(
Address() )
257 : array_type_(ar.array_type_), address_(ar.address_)
262 : array_type_(type), address_(address)
265 THROW( ExcAccessorForNullStorage() << EI_AccessorName(
"Array") );
void print_stacktrace(std::ostream &out) const
Prints formated stacktrace into given stream out.
#define THROW(whole_exception_expr)
Wrapper for throw. Saves the throwing point.
virtual void print_info(std::ostringstream &out) const =0