[DAEMON-248] Allow arbitrary metadata to be added to error objects
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | Critical |
Status | Resolved |
Resolution | Fixed |
Resolution Date | 2018-03-30T05:25:18.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Appc Daemon 1.1.0 |
Components | appcd |
Labels | n/a |
Reporter | Chris Barber |
Assignee | Chris Barber |
Created | 2018-03-30T03:12:04.000+0000 |
Updated | 2018-03-30T20:41:47.000+0000 |
Description
As the daemon routes errors from a plugin to the core or from the core over a WebSocket, errors are treated special so that can recreate the error as a real Error object whenever coming for another context. The problem is error properties are whitelisted and some are computed (getters).
All error handling needs to be cleaned up so that we can pass along arbitrary values added to the original error object.
When
appcd exec
is returned an error, the error should be stringified to reveal all properties including the hidden error object properties.
https://github.com/appcelerator/appc-daemon/pull/306 https://github.com/appcelerator/appc-daemon/pull/307