handleException(exception, options) {
        if (this.#isUnloading) return;

        ({exception, options} = this.parseArgs(exception, options));

        this.logException(exception, options);
        if (options.showAlert) {
            XH.appContainerModel.exceptionDialogModel.show(exception, options);
        }
        if (options.logOnServer) {
            this.logOnServerAsync({exception, userAlerted: options.showAlert});
        }
    }
/**
     * Called by Hoist internally to handle exceptions, with built-in support for parsing certain
     * Hoist-specific exception options, displaying an appropriate error dialog to users, and
     * logging back to the server for stateful error tracking in the Admin Console.
     *
     * Typical application entry points to this method are the {@see XH.handleException} alias and
     * {@see Promise.catchDefault}.
     *
     * This handler provides the most value with Exceptions created by {@see Exception.create}.
     * Hoist automatically creates such exceptions in most instances, most notably in FetchService,
     * which generates de-serialized versions of server exceptions. {@see XH.exception} for a
     * convenient way to create these enhanced exceptions in application code.
     *
     * This handler will respect an `isRoutine` flag set on Exceptions that can be thrown in the
     * course of "normal" app operation and do not represent unexpected errors. When true, this
     * handler will apply defaults that avoid overly alarming the user and skip server-side logging.
     *
     * @param {(Error|Object|string)} exception - Error or thrown object - if not an Error, an
     *      Exception will be created via `Exception.create()`.
     * @param {Object} [options] - controls on how the exception should be shown and/or logged.
     * @param {string} [options.message] - text (ideally user-friendly) describing the error.
     * @param {string} [options.title] - title for an alert dialog, if shown.
     * @param {boolean} [options.showAsError] - configure modal alert and logging to indicate that
     *      this is an unexpected error. Default true for most exceptions, false for those marked
     *      as `isRoutine`.
     * @param {boolean} [options.logOnServer] - send the exception to the server to be stored for
     *      review in the Hoist Admin Console. Default true when `showAsError` is true, excepting
     *      'isAutoRefresh' fetch exceptions.
     * @param {boolean} [options.showAlert] - display an alert dialog to the user. Default true,
     *      excepting 'isAutoRefresh' and 'isFetchAborted' exceptions.
     * @param {boolean} [options.requireReload] - force user to fully refresh the app in order to
     *      dismiss - default false, excepting session-related exceptions.
     * @param {string[]} [options.hideParams] - A list of parameters that should be hidden from
     *      the exception log and alert.
     */
Called by Hoist internally to handle exceptions, with built-in support for parsing certain
Hoist-specific exception options, displaying an appropriate error dialog to users, and
logging back to the server for stateful error tracking in the Admin Console.

Typical application entry points to this method are the  XH.handleException alias and
Promise.catchDefault.

This handler provides the most value with Exceptions created by  Exception.create.
Hoist automatically creates such exceptions in most instances, most notably in FetchService,
which generates de-serialized versions of server exceptions.  XH.exception for a
convenient way to create these enhanced exceptions in application code.

This handler will respect an `isRoutine` flag set on Exceptions that can be thrown in the
course of "normal" app operation and do not represent unexpected errors. When true, this
handler will apply defaults that avoid overly alarming the user and skip server-side logging.

@param {(Error|Object|string)} exception - Error or thrown object - if not an Error, an
Exception will be created via `Exception.create()`.
@param {Object} [options] - controls on how the exception should be shown and/or logged.
@param {string} [options.message] - text (ideally user-friendly) describing the error.
@param {string} [options.title] - title for an alert dialog, if shown.
@param {boolean} [options.showAsError] - configure modal alert and logging to indicate that
this is an unexpected error. Default true for most exceptions, false for those marked
as `isRoutine`.
@param {boolean} [options.logOnServer] - send the exception to the server to be stored for
review in the Hoist Admin Console. Default true when `showAsError` is true, excepting
'isAutoRefresh' fetch exceptions.
@param {boolean} [options.showAlert] - display an alert dialog to the user. Default true,
excepting 'isAutoRefresh' and 'isFetchAborted' exceptions.
@param {boolean} [options.requireReload] - force user to fully refresh the app in order to
dismiss - default false, excepting session-related exceptions.
@param {string[]} [options.hideParams] - A list of parameters that should be hidden from
the exception log and alert.
Called by Hoist internally to handle exceptions with built - in support for parsing certain Hoist - specific exception options displaying an appropriate error dialog to users and logging back to the server for stateful error tracking in the Admin Console . Typical application entry points to this method are the XH . handleException alias and Promise . catchDefault . This handler provides the most value with Exceptions created by Exception . create . Hoist automatically creates such exceptions in most instances most notably in FetchService which generates de - serialized versions of server exceptions . XH . exception for a convenient way to create these enhanced exceptions in application code . This handler will respect an ` isRoutine ` flag set on Exceptions that can be thrown in the course of " normal " app operation and do not represent unexpected errors . When true this handler will apply defaults that avoid overly alarming the user and skip server - side logging . @param { ( Error|Object|string ) } exception - Error or thrown object - if not an Error an Exception will be created via ` Exception . create () ` . @param { Object } [ options ] - controls on how the exception should be shown and / or logged . @param { string } [ options . message ] - text ( ideally user - friendly ) describing the error . @param { string } [ options . title ] - title for an alert dialog if shown . @param { boolean } [ options . showAsError ] - configure modal alert and logging to indicate that this is an unexpected error . Default true for most exceptions false for those marked as ` isRoutine ` . @param { boolean } [ options . logOnServer ] - send the exception to the server to be stored for review in the Hoist Admin Console . Default true when ` showAsError ` is true excepting ' isAutoRefresh ' fetch exceptions . @param { boolean } [ options . showAlert ] - display an alert dialog to the user . Default true excepting ' isAutoRefresh ' and ' isFetchAborted ' exceptions . @param { boolean } [ options . requireReload ] - force user to fully refresh the app in order to dismiss - default false excepting session - related exceptions . @param { string [] } [ options . hideParams ] - A list of parameters that should be hidden from the exception log and alert .
handleException(exception, options) {
        if (this.#isUnloading) return;
        ({exception, options} = this.parseArgs(exception, options));
        this.logException(exception, options);
        if (options.showAlert) {
            XH.appContainerModel.exceptionDialogModel.show(exception, options);
        }
        if (options.logOnServer) {
            this.logOnServerAsync({exception, userAlerted: options.showAlert});
        }
    }
handleException ( exception , options ) { if ( this . #isUnloading ) return ; ( { exception , options } = this . parseArgs ( exception , options ) ) ; this . logException ( exception , options ) ; if ( options . showAlert ) { XH . appContainerModel . exceptionDialogModel . show ( exception , options ) ; } if ( options . logOnServer ) { this . logOnServerAsync ( { exception , userAlerted : options . showAlert } ) ; } }
Called by Hoist internally to handle exceptions, with built-in support for parsing certain
 Hoist-specific exception options, displaying an appropriate error dialog to users, and
 logging back to the server for stateful error tracking in the Admin Console.
Called by Hoist internally to handle exceptions with built - in support for parsing certain Hoist - specific exception options displaying an appropriate error dialog to users and logging back to the server for stateful error tracking in the Admin Console .