wip
This commit is contained in:
@@ -52,12 +52,15 @@ export class ConsoleMonitor {
|
||||
|
||||
// Monitor uncaught exceptions
|
||||
page.on('pageerror', (error: Error) => {
|
||||
this.errors.push({
|
||||
const errorObj: ConsoleError = {
|
||||
type: 'pageerror',
|
||||
message: error.message,
|
||||
location: error.stack,
|
||||
timestamp: new Date(),
|
||||
});
|
||||
};
|
||||
if (error.stack) {
|
||||
errorObj.location = error.stack;
|
||||
}
|
||||
this.errors.push(errorObj);
|
||||
});
|
||||
|
||||
this.isMonitoring = true;
|
||||
|
||||
Reference in New Issue
Block a user