UNPKG

@dynatrace/react-native-plugin

Version:

This plugin gives you the ability to use the Dynatrace Mobile agent in your react native application.

36 lines (35 loc) 1.28 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DynatraceSecondGenForwarder = void 0; const Dynatrace_1 = require("./Dynatrace"); class DynatraceSecondGenForwarderImpl { reportError(errorName, errorCode) { Dynatrace_1.Dynatrace.reportErrorCode(errorName, errorCode, true); } reportErrorWithStacktrace(errorName, reason, stacktrace) { Dynatrace_1.Dynatrace.reportError({ name: errorName, message: reason, stack: stacktrace, }, true); } reportErrorStacktrace(errorName, errorValue, reason, stacktrace) { Dynatrace_1.Dynatrace.reportError({ name: errorName, message: reason, stack: stacktrace, }, true); } reportCrash(crashName, reason, stacktrace) { Dynatrace_1.Dynatrace.reportCrash({ name: crashName, message: reason, stack: stacktrace, }, true, false); } reportCrashWithException(crashName, crash) { const copyCrash = Object.assign(Object.assign({}, crash), { name: crashName }); Dynatrace_1.Dynatrace.reportCrash(copyCrash, true, false); } } exports.DynatraceSecondGenForwarder = new DynatraceSecondGenForwarderImpl();