Skip to content

Commit 4a73099

Browse files
committed
ficed compiler errors
1 parent 8ce3ec9 commit 4a73099

8 files changed

+145
-47
lines changed

dist/exceptionless.es5.d.ts

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ export declare class ContextData {
5858
export interface IEnvironmentInfoCollector {
5959
getEnvironmentInfo(context: EventPluginContext): IEnvironmentInfo;
6060
}
61+
export interface IErrorParser {
62+
parse(context: EventPluginContext, exception: Error): Promise<IError>;
63+
}
6164
export interface IRequestInfoCollector {
6265
getRequestInfo(context: EventPluginContext): IRequestInfo;
6366
}
@@ -76,6 +79,7 @@ export interface IConfigurationSettings {
7679
apiKey?: string;
7780
serverUrl?: string;
7881
environmentInfoCollector?: IEnvironmentInfoCollector;
82+
errorParser?: IErrorParser;
7983
lastReferenceIdManager?: ILastReferenceIdManager;
8084
log?: ILog;
8185
requestInfoCollector?: IRequestInfoCollector;
@@ -162,6 +166,7 @@ export declare class Configuration implements IConfigurationSettings {
162166
private _serverUrl;
163167
private _plugins;
164168
environmentInfoCollector: IEnvironmentInfoCollector;
169+
errorParser: IErrorParser;
165170
lastReferenceIdManager: ILastReferenceIdManager;
166171
log: ILog;
167172
requestInfoCollector: IRequestInfoCollector;
@@ -201,6 +206,7 @@ export declare class EventBuilder {
201206
addTags(...tags: string[]): EventBuilder;
202207
setProperty(name: string, value: any): EventBuilder;
203208
markAsCritical(critical: boolean): EventBuilder;
209+
addRequestInfo(request: any): EventBuilder;
204210
submit(): Promise<any>;
205211
private isValidIdentifier(value);
206212
}
@@ -214,8 +220,8 @@ export declare class ExceptionlessClient {
214220
constructor(apiKey: string, serverUrl?: string);
215221
createException(exception: Error): EventBuilder;
216222
submitException(exception: Error): Promise<any>;
217-
createUnhandledException(exception: Error): EventBuilder;
218-
submitUnhandledException(exception: Error): Promise<any>;
223+
createUnhandledException(exception: Error, submissionMethod?: string): EventBuilder;
224+
submitUnhandledException(exception: Error, submissionMethod?: string): Promise<any>;
219225
createFeatureUsage(feature: string): EventBuilder;
220226
submitFeatureUsage(feature: string): Promise<any>;
221227
createLog(message: string): EventBuilder;
@@ -285,9 +291,6 @@ export declare class ErrorPlugin implements IEventPlugin {
285291
priority: number;
286292
name: string;
287293
run(context: EventPluginContext): Promise<any>;
288-
private processError(context, exception, stackFrames);
289-
private onParseError(context);
290-
private getStackFrames(context, stackFrames);
291294
}
292295
export declare class DuplicateCheckerPlugin implements IEventPlugin {
293296
priority: number;
@@ -358,6 +361,10 @@ export declare class NodeEnvironmentInfoCollector implements IEnvironmentInfoCol
358361
getEnvironmentInfo(context: EventPluginContext): IEnvironmentInfo;
359362
private getIpAddresses();
360363
}
364+
export declare class NodeErrorParser implements IErrorParser {
365+
parse(context: EventPluginContext, exception: Error): Promise<IError>;
366+
private getStackFrames(context, stackFrames);
367+
}
361368
export declare class NodeRequestInfoCollector implements IRequestInfoCollector {
362369
getRequestInfo(context: EventPluginContext): IRequestInfo;
363370
}
@@ -373,6 +380,12 @@ export declare class NodeBootstrapper implements IBootstrapper {
373380
private getExitCodeReason(code);
374381
private isNode();
375382
}
383+
export declare class WebErrorParser implements IErrorParser {
384+
parse(context: EventPluginContext, exception: Error): Promise<IError>;
385+
private processError(context, exception, stackFrames);
386+
private onParseError(context);
387+
private getStackFrames(context, stackFrames);
388+
}
376389
export declare class WebRequestInfoCollector implements IRequestInfoCollector {
377390
getRequestInfo(context: EventPluginContext): IRequestInfo;
378391
private getCookies();

dist/exceptionless.es5.js

Lines changed: 116 additions & 35 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/exceptionless.es5.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/exceptionless.es5.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/exceptionless.es5.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/services/NodeErrorParser.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@ import { IErrorParser } from 'IErrorParser';
33
import { IStackFrame } from '../models/IStackFrame';
44
import { EventPluginContext } from '../plugins/EventPluginContext';
55

6-
import stacktrace = require('stack-trace');
6+
import nodestacktrace = require('stack-trace');
77

88
export class NodeErrorParser implements IErrorParser {
99
public parse(context:EventPluginContext, exception:Error): Promise<IError> {
10-
if (!stacktrace) {
10+
if (!nodestacktrace) {
1111
context.cancel = true;
1212
return Promise.reject(new Error('Unable to load the stack trace library. This exception will be discarded.'))
1313
}
1414

15-
var stackFrames = stacktrace.parse(exception);
15+
var stackFrames = nodestacktrace.parse(exception);
1616
if (!stackFrames || stackFrames.length === 0) {
1717
context.cancel = true;
1818
return Promise.reject(new Error('Unable to parse the exceptions stack trace. This exception will be discarded.'))

src/tsconfig.es5.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
"files": [
1010
"../typings/es6-promise/es6-promise.d.ts",
1111
"../typings/node/node.d.ts",
12+
"typings/node-stack-trace/node-stack-trace.d.ts",
13+
"typings/stacktrace/stacktrace.d.ts",
1214
"bootstrap/IBootstrapper",
1315
"bootstrap/NodeBootstrapper",
1416
"bootstrap/WindowBootstrapper",

src/tsconfig.es6.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
},
88
"files": [
99
"../typings/node/node.d.ts",
10+
"typings/node-stack-trace/node-stack-trace.d.ts",
11+
"typings/stacktrace/stacktrace.d.ts",
1012
"bootstrap/IBootstrapper",
1113
"bootstrap/NodeBootstrapper",
1214
"bootstrap/WindowBootstrapper",

0 commit comments

Comments
 (0)