You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are a bunch of different ways that patching can fail, and different levels of severity for any given patch failure:
A patched function may throw due to errors introduced by the patch
A patched function may throw due to errors that the patch checks for and simply forwards along to the patchee.
A patched callback/event handler may throw itself
A patched callback/event handler may call an original callback/event handler that throws
When the original library throws or when the user-supplied callback or event handler throws, this may be caused either by the user supplying known-invalid arguments or by a patch making incorrect changes to the user-supplied arguments.
Regardless, we should likely have a way to track these errors. Some initial notes on that:
We probably want to report what argument configuration caused this error to come up, but we definitely don't want to actually give all of the arguments themselves for security reasons. Perhaps we can track the types of arguments provided as a middle ground? Or, we could log everything and let the channel user decide what to do for security depending on their use case.
Errors coming from user-supplied callbacks and original libraries could be completely not our fault, but determining when that's the case is tough.
We could publish them all over a dedicated channel: channel.publish("patch-error", { err: Error, severity: number, arguments: any[]}
We could provide an API to hook into: channel.throw() /* from the publisher */ -> channel.catch() /* from the subscriber */
The text was updated successfully, but these errors were encountered:
There are a bunch of different ways that patching can fail, and different levels of severity for any given patch failure:
When the original library throws or when the user-supplied callback or event handler throws, this may be caused either by the user supplying known-invalid arguments or by a patch making incorrect changes to the user-supplied arguments.
Regardless, we should likely have a way to track these errors. Some initial notes on that:
channel.publish("patch-error", { err: Error, severity: number, arguments: any[]}
channel.throw() /* from the publisher */ -> channel.catch() /* from the subscriber */
The text was updated successfully, but these errors were encountered: