async logOnServerAsync({exception, userAlerted, userMessage}) {
        try {
            const error = stringifyErrorSafely(exception),
                username = XH.getUsername();

            if (!username) {
                console.warn('Error report cannot be submitted to UI server - user unknown');
                return false;
            }

            await XH.fetchJson({
                url: 'xh/submitError',
                params: {
                    error,
                    msg: userMessage ? stripTags(userMessage) : '',
                    appVersion: XH.getEnv('clientVersion'),
                    url: window.location.href,
                    userAlerted,
                    clientUsername: username
                }
            });
            return true;
        } catch (e) {
            console.error('Exception while submitting error report to UI server', e);
            return false;
        }
    }
/**
     * Create a server-side exception entry. Client metadata will be set automatically.
     *
     * This method will swallow any exceptions thrown in the course of its own execution, failing
     * silently to avoid masking or compounding the actual exception to be handled.
     *
     * (Note the App version is POSTed to ensure we capture the version of the client the user is
     * actually running when the exception was generated.)
     *
     * @param {Object} options - an options object
     * @param {Error} options.exception - an instance of the Javascript Error object.
     * @param {boolean} options.userAlerted - true if the user was shown a modal alert.
     * @param {string} [options.userMessage] - a user-provided message, if any, detailing what they
     *      did to trigger the error, or any other details the user chooses to provide.
     * @returns {boolean} - true if message was successfully sent to server.
     */
Create a server-side exception entry. Client metadata will be set automatically.
This method will swallow any exceptions thrown in the course of its own execution, failing
silently to avoid masking or compounding the actual exception to be handled.

(Note the App version is POSTed to ensure we capture the version of the client the user is
actually running when the exception was generated.)

@param {Object} options - an options object
@param {Error} options.exception - an instance of the Javascript Error object.
@param {boolean} options.userAlerted - true if the user was shown a modal alert.
@param {string} [options.userMessage] - a user-provided message, if any, detailing what they
did to trigger the error, or any other details the user chooses to provide.
@returns {boolean} - true if message was successfully sent to server.
Create a server - side exception entry . Client metadata will be set automatically . This method will swallow any exceptions thrown in the course of its own execution failing silently to avoid masking or compounding the actual exception to be handled . ( Note the App version is POSTed to ensure we capture the version of the client the user is actually running when the exception was generated . ) @param { Object } options - an options object @param { Error } options . exception - an instance of the Javascript Error object . @param { boolean } options . userAlerted - true if the user was shown a modal alert . @param { string } [ options . userMessage ] - a user - provided message if any detailing what they did to trigger the error or any other details the user chooses to provide . @returns { boolean } - true if message was successfully sent to server .
async logOnServerAsync({exception, userAlerted, userMessage}) {
        try {
            const error = stringifyErrorSafely(exception),
                username = XH.getUsername();
            if (!username) {
                console.warn('Error report cannot be submitted to UI server - user unknown');
                return false;
            }
            await XH.fetchJson({
                url: 'xh/submitError',
                params: {
                    error,
                    msg: userMessage ? stripTags(userMessage) : '',
                    appVersion: XH.getEnv('clientVersion'),
                    url: window.location.href,
                    userAlerted,
                    clientUsername: username
                }
            });
            return true;
        } catch (e) {
            console.error('Exception while submitting error report to UI server', e);
            return false;
        }
    }
async logOnServerAsync ( { exception , userAlerted , userMessage } ) { try { const error = stringifyErrorSafely ( exception ) , username = XH . getUsername ( ) ; if ( ! username ) { console . warn ( 'Error report cannot be submitted to UI server - user unknown' ) ; return false ; } await XH . fetchJson ( { url : 'xh/submitError' , params : { error , msg : userMessage ? stripTags ( userMessage ) : '' , appVersion : XH . getEnv ( 'clientVersion' ) , url : window . location . href , userAlerted , clientUsername : username } } ) ; return true ; } catch ( e ) { console . error ( 'Exception while submitting error report to UI server' , e ) ; return false ; } }
Create a server-side exception entry.
Create a server - side exception entry .