Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
Signed-off-by: yayanyang <yayanyang@gmail.com>
  • Loading branch information
yayanyang committed Sep 12, 2012
1 parent 0d01b5b commit aaef284
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions sys/errorcode.hpp
Expand Up @@ -20,6 +20,11 @@ namespace lemon{

error_info() { reset(); }

error_info(const LemonErrorInfo * ec)
{
memcpy((LemonErrorInfo*)this,ec,sizeof(ec));
}

void reset() { LEMON_RESET_ERRORINFO(*this); _message.clear(); }

const lemon::String & error_msg() const { return _message; }
Expand Down Expand Up @@ -56,6 +61,10 @@ namespace lemon{

struct scope_error_info : public error_info
{
scope_error_info(){}

scope_error_info(const LemonErrorInfo * ec):error_info(ec){}

~scope_error_info()
{
check_throw();
Expand Down

0 comments on commit aaef284

Please sign in to comment.