UNPKG

1.03 kBTypeScriptView Raw
1import { Logger } from './logger';
2export declare class IError extends Error {
3 code?: number;
4 stack?: string;
5}
6export declare class ProtractorError extends IError {
7 static ERR_MSGS: string[];
8 static CODE: number;
9 static SUPRESS_EXIT_CODE: boolean;
10 message: string;
11 constructor(logger: Logger, message: string, code: number, error?: Error);
12 static log(logger: Logger, code: number, message: string, stack: string): void;
13}
14/**
15 * Configuration file error
16 */
17export declare class ConfigError extends ProtractorError {
18 static CODE: number;
19 constructor(logger: Logger, message: string, error?: Error);
20}
21/**
22 * Browser errors including getting a driver session, direct connect, etc.
23 */
24export declare class BrowserError extends ProtractorError {
25 static CODE: number;
26 static ERR_MSGS: string[];
27 constructor(logger: Logger, message: string);
28}
29export declare class ErrorHandler {
30 static isError(errMsgs: string[], e: Error): boolean;
31 static parseError(e: Error): number;
32}