The CustomCommandError class in @minecraft/server.
Class in @minecraft/server
Extends Error
import { CustomCommandError } from '@minecraft/server';Example
Section titled “Example”import { CustomCommandError } from '@minecraft/server';
try { // Call the API here.} catch (error) { if (error instanceof CustomCommandError) { console.warn(`${error.name}: ${error.message}`); } else { throw error; }}import { CustomCommandError } from '@minecraft/server';
try { // Call the API here.}catch (error) { if (error instanceof CustomCommandError) { console.warn(`${error.name}: ${error.message}`); } else { throw error; }}