Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
errors: add todo comment to investigate SystemError properties
It is not clear why some operations are done in a specific way. This
should be clarified to potentially simplify the implementation.
  • Loading branch information
BridgeAR committed Oct 1, 2019
commit f9d8303a8693e5f85311a7feefa10b845ef92643
5 changes: 5 additions & 0 deletions lib/internal/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,11 @@ class SystemError extends Error {
});

if (context.path !== undefined) {
// TODO(BridgeAR): Investigate why and when the `.toString()` was
// introduced. The `path` and `dest` properties in the context seem to
// always be of type string. We should probably just remove the
// `.toString()` and `Buffer.from()` operations and set the value on the
// context as the user did.
Object.defineProperty(this, 'path', {
get() {
return context.path != null ?
Expand Down