26 lines
477 B
JavaScript
26 lines
477 B
JavaScript
"use strict";
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports.tryEvent = tryEvent;
|
|
exports.tryEnd = tryEnd;
|
|
/** @license MIT License (c) copyright 2010-2016 original author or authors */
|
|
/** @author Brian Cavalier */
|
|
/** @author John Hann */
|
|
|
|
function tryEvent(t, x, sink) {
|
|
try {
|
|
sink.event(t, x);
|
|
} catch (e) {
|
|
sink.error(t, e);
|
|
}
|
|
}
|
|
|
|
function tryEnd(t, x, sink) {
|
|
try {
|
|
sink.end(t, x);
|
|
} catch (e) {
|
|
sink.error(t, e);
|
|
}
|
|
} |