uawdijnntqw1x1x1
IP : 216.73.217.167
Hostname : xhost1.intravision.ru
Kernel : Linux xhost1.intravision.ru 3.16.0-7-amd64 #1 SMP Debian 3.16.59-1 (2018-10-03) x86_64
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
OS : Linux
PATH:
/
var
/
www
/
tiskom
/
data
/
www
/
tiskom.xhost.intravision.ru
/
bitrix
/
js
/
main
/
.
/
core
/
src
/
lib
/
base-error.js
/
/
import Type from './type'; const isError = Symbol.for('BX.BaseError.isError'); /** * @memberOf BX */ export default class BaseError { constructor(message?: string, code?: string, customData?: any) { this[isError] = true; this.message = ''; this.code = null; this.customData = null; this.setMessage(message); this.setCode(code); this.setCustomData(customData); } /** * Returns a brief description of the error * @returns {string} */ getMessage(): string { return this.message; } /** * Sets a message of the error * @param {string} message * @returns {this} */ setMessage(message: string): this { if (Type.isString(message)) { this.message = message; } return this; } /** * Returns a code of the error * @returns {?string} */ getCode(): string { return this.code; } /** * Sets a code of the error * @param {string} code * @returns {this} */ setCode(code: string): this { if (Type.isStringFilled(code) || code === null) { this.code = code; } return this; } /** * Returns custom data of the error * @returns {null|*} */ getCustomData(): any { return this.customData; } /** * Sets custom data of the error * @returns {this} */ setCustomData(customData: any): this { if (!Type.isUndefined(customData)) { this.customData = customData; } return this; } toString() { const code = this.getCode(); const message = this.getMessage(); if (!Type.isStringFilled(code) && !Type.isStringFilled(message)) { return ''; } else if (!Type.isStringFilled(code)) { return `Error: ${message}`; } else if (!Type.isStringFilled(message)) { return code; } else { return `${code}: ${message}`; } } /** * Returns true if the object is an instance of BaseError * @param error * @returns {boolean} */ static isError(error: BaseError) { return Type.isObject(error) && error[isError] === true; } }
/var/www/tiskom/data/www/tiskom.xhost.intravision.ru/bitrix/js/main/./core/src/lib/base-error.js