| 25 | }; |
| 26 | |
| 27 | class DukErrorException : public DukException |
| 28 | { |
| 29 | public: |
| 30 | DukErrorException(duk_context* ctx, int return_code, bool pop_error = true) { |
| 31 | if (return_code != 0) { |
| 32 | duk_get_prop_string(ctx, -1, "stack"); |
| 33 | mMsg = duk_safe_to_string(ctx, -1); |
| 34 | duk_pop(ctx); |
| 35 | |
| 36 | if (pop_error) |
| 37 | duk_pop(ctx); |
| 38 | } |
| 39 | } |
| 40 | }; |
no outgoing calls
no test coverage detected