diff options
| author | Igor Pashev <pashev.igor@gmail.com> | 2012-05-07 17:33:21 +0400 |
|---|---|---|
| committer | Igor Pashev <pashev.igor@gmail.com> | 2012-05-07 17:33:21 +0400 |
| commit | 279df85d8b80bedea782686665b5c02d56228998 (patch) | |
| tree | d49660ab956626d29875666bed57a4d19969ee00 | |
| parent | fe3a91a937ba27a898ea47b28f40db4cfaa40ba4 (diff) | |
| download | node-augeas-master.tar.gz | |
| -rw-r--r-- | libaugeas.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libaugeas.cc b/libaugeas.cc index 60580f4..5ffa6d6 100644 --- a/libaugeas.cc +++ b/libaugeas.cc @@ -41,7 +41,13 @@ inline std::string aug_error_msg(augeas *aug) inline void throw_aug_error_msg(augeas *aug) { - ThrowException(Exception::Error(String::New(aug_error_msg(aug).c_str()))); + if (AUG_NOERROR != aug_error(aug)) { + ThrowException(Exception::Error(String::New(aug_error_msg(aug).c_str()))); + } else { + ThrowException(Exception::Error( + String::New( + "An error has occured from Augeas API call, but no description available"))); + } } |
