"use strict";function e(r){let t={name:r.name};return Object.getOwnPropertyNames(r).forEach((a=>{let n=r[a];n instanceof Error?t[a]=e(n):t[a]=n})),t}class r extends Error{constructor(e,r=null){super(e),Object.defineProperty(this,"name",{configurable:!0,writable:!0,enumerable:!0,value:"RuntimeError"}),Object.defineProperty(this,"message",{configurable:!0,writable:!0,enumerable:!0,value:this.message}),Object.defineProperty(this,"stack",{configurable:!0,writable:!0,enumerable:!0,value:this.stack}),Object.defineProperty(this,"cause",{configurable:!0,writable:!0,enumerable:!0,value:r})}toJSON(){return e(this)}}exports.RuntimeError=r;