electron-log
Advanced tools
Comparing version 3.0.0-beta3 to 3.0.0-beta4
@@ -82,3 +82,3 @@ export type ILogLevel = "error" | "warn" | "info" | "verbose" | "debug" | | ||
catchErrors(options?: ICatchErrorsOptions): void; | ||
catchErrors(options?: ICatchErrorsOptions): void | false; | ||
@@ -99,3 +99,5 @@ error(...params: any[]): void; | ||
export declare function catchErrors(options?: ICatchErrorsOptions): void; | ||
export declare function catchErrors( | ||
options?: ICatchErrorsOptions, | ||
): void | false; | ||
@@ -102,0 +104,0 @@ export declare function error(...params: any[]): void; |
@@ -26,3 +26,5 @@ 'use strict'; | ||
if (typeof options.onError === 'function') { | ||
options.onError(e); | ||
if (options.onError(e) === false) { | ||
return; | ||
} | ||
} | ||
@@ -29,0 +31,0 @@ |
@@ -76,3 +76,3 @@ 'use strict'; | ||
messages = messages.filter(function (el) { | ||
if (el.substr && el.substr(0, 6) === 'color:') { | ||
if (el && el.substr && el.substr(0, 6) === 'color:') { | ||
styles.push(el); | ||
@@ -79,0 +79,0 @@ return false; |
{ | ||
"name": "electron-log", | ||
"version": "3.0.0-beta3", | ||
"version": "3.0.0-beta4", | ||
"description": "Just a very simple logging module for your Electron application", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -153,3 +153,4 @@ # electron-log | ||
showing a default electron error dialog | ||
- **onError**, (error) => void, default null - attach a custom error handler | ||
- **onError**, (error) => void | false, default null - attach a custom | ||
error handler. If the handler returns false, this error will not be processed. | ||
@@ -156,0 +157,0 @@ ### [Hooks](doc/extend.md#hooks) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
33417
877
168