mirror of
https://github.com/garrytan/gstack.git
synced 2026-09-21 04:10:47 +02:00
harden runtime packaging and verification
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
/** Create an operational error whose stable code can cross the CLI boundary. */
|
||||
export function errorWithCode(message, code, cause) {
|
||||
const error = cause === undefined ? new Error(message) : new Error(message, { cause });
|
||||
error.code = code;
|
||||
return error;
|
||||
}
|
||||
Reference in New Issue
Block a user