Utility functions for @unitybase/ub-pub module
Members
# isChrome : boolean static
# isGecko : boolean static
# isMac : boolean static
# isNodeJS : boolean static
# isOpera : boolean static
# isReactNative : boolean static
# isSecureBrowser : boolean static
# isWebKit : boolean static
# LDS_KEYS static
localDataStorage keys used by @unitybase-ub-pub (in case of browser environment)
# userAgent : string static
Methods
# log (msg: *) static
Log message to console (if console available)
Arguments:
msg
: *
# logDebug (msg: *) static
Log debug message to console. Since it binds to console, can also be used to debug Promise resolving in this way
Arguments:
msg
: *
UB.get('timeStamp').then(UB.logDebug);
# logError (msg: *) static
Log error message to console (if console available)
Arguments:
msg
: *
# logWarn (msg: *) static
Log warning message to console (if console available)
Arguments:
msg
: *
# parseUBError (errMsg: string | object | Error | UBError, errCodeopt: string, entityCodeopt: string, detail: string) → Object static
Parse error and translate message using i18n
# UBAbortError (messageopt: string, detailopt: string) inner
Quiet exception. Global error handler does not show this exception for user. Use it for silently reject promise
# UBError (message: string, detailopt: string, codeopt: number) inner
UnityBase client-side exception. Such exceptions will not be showed as unknown error in UB.showErrorWindow
Arguments:
// in adminUI will show message box with text:
// "Record was locked by other user. It\'s read-only for you now"
throw new UB.UBError('lockedBy')