Custom error class for VFS Sandbox operations.
Provides structured error information including:
class VfsSandboxErrortry {
await sandbox.read("/some/file.txt");
} catch (error) {
if (error instanceof VfsSandboxError) {
switch (error.code) {
case "NOT_INITIALIZED":
await sandbox.initialize();
break;
case "FILE_OPERATION_FAILED":
console.error("File operation failed");
break;
default:
throw error;
}
}
}Symbol for identifying sandbox error instances
Original error that caused this error (for debugging)
Structured error code for programmatic handling
Error name for instanceof checks and logging