apps-script-utils 2.1.1 Help

Exception

class Exception extends Error

The base of the hierarchy, extending Error. Catch this to catch everything the library throws and nothing else.

Every class in this hierarchy takes an optional message, another exception whose message it reuses, or nothing at all. isException recognises all of them; a plain Error is not one.

Examples

Throwing and catching

throw new Exception("something specific about this call"); try { doWork(); } catch (error) { if (error instanceof Exception) { // handled } }

See also

Source

src/exception/Exception.ts

23 September 2026

This documentation was generated with AI (Claude) from the library's source code.