Skip to content

Latest commit

 

History

History
23 lines (14 loc) · 422 Bytes

error.md

File metadata and controls

23 lines (14 loc) · 422 Bytes

nodejsscriptDocs


nodejsscript / $ / error

Function: error()

error(message): Error

Throws user targeted error

const number= await $.read({ "-p". "Insert a number:" });
if(Number.isNaN(Number(number))) $.error(`Provided text '${number}' is not a number`);

Parameters

message: string

Returns

Error