Skip to content

Instantly share code, notes, and snippets.

@melcor76
Last active January 27, 2019 10:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save melcor76/7f85d8090d6abf83c98ba7269d19c019 to your computer and use it in GitHub Desktop.
Save melcor76/7f85d8090d6abf83c98ba7269d19c019 to your computer and use it in GitHub Desktop.
Error handling - loggin.service.ts
import { Injectable } from '@angular/core';
@Injectable({
providedIn: 'root'
})
export class LoggingService {
logError(message: string, stack: string) {
// Send errors to be saved here
// The console.log is only for testing this example.
console.log('LoggingService: ' + message);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment