Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
error-reporting: Fix
report()
silently failing (#2363)
* error-reporting: Fix `report()` silently failing If the `report()` method is called with a number, an associated error never appears in the error reporting console, and no log message is printed to the user to indicate why the error has not appeared. * Fix linting errors * Add the new `build-stack-trace.js` file * Add more system tests for `errors.report()` * Rename errorHandlerRouter to populateErrorMessage * Rename error-router to populate-error-message * Reorganize the populate-error-message tests * Update buildStackTrace to use captureStackTrace The `Error.captureStackTrace` method is now used in the `buildStackTrace` function to create a stack trace. * Simplify the system tests The code for verifiying that stack traces don't contain error-reporting specific frames has been consolidated into a single location. * Consolidate code in populate-error-message.js * Make the `buildStackTrace` more robust In particular, the `buildStackTrace` was updated to ensure that no error-reporting specific frames are included in the built stack trace. In addition, the system-tests have been updated to ensure error-reporting related frames, and only those frames, are removed from the built stack trace.
- Loading branch information