13 #include <ecl/config/ecl.hpp> 22 #include "../../../include/ecl/devices/detail/exception_handler_pos.hpp" 35 using std::ostringstream;
45 int error_result = errno;
46 switch (error_result) {
50 case ( EFBIG ) :
case (EOVERFLOW) :
59 case ( ENOSPC ) :
return StandardException(loc,
ecl::OutOfResourcesError,
string(
"Could not open ")+file_name+
string(
". The container device (usually hard disk) has insufficient space to create the file."));
62 case ( ETXTBSY ):
return StandardException(loc,
ecl::UsageError,
string(
"Could not open ")+file_name+
string(
". Trying to write to a currently executing file."));
65 ostringstream ostream;
66 ostream <<
"Unknown errno " << error_result <<
" [" << strerror(error_result) <<
"]";
74 int error_result = errno;
75 switch (error_result) {
77 case ( EBADF ) :
case (EINVAL)
87 ostringstream ostream;
88 ostream <<
"Unknown error " << error_result <<
": " << strerror(error_result) <<
".";
96 int error_result = errno;
97 switch (error_result) {
99 case ( EBADF ) :
case (EINVAL)
107 ostringstream ostream;
108 ostream <<
"Unknown error " << error_result <<
": " << strerror(error_result) <<
".";
114 int error_result = errno;
115 switch (error_result) {
118 case ( EROFS ) :
case ( EINVAL )
122 ostringstream ostream;
123 ostream <<
"Unknown error " << error_result <<
": " << strerror(error_result) <<
".";
129 int error_result = errno;
130 switch (error_result) {
136 ostringstream ostream;
137 ostream <<
"Unknown error " << error_result <<
": " << strerror(error_result) <<
".";
Embedded control libraries.
StandardException read_exception(const char *loc)
StandardException open_exception(const char *loc, const std::string &file_name)
StandardException sync_exception(const char *loc, const std::string &file_name)
StandardException close_exception(const char *loc, const std::string &file_name)
StandardException write_exception(const char *loc)