Blacked and isorted the python files

Prettied and eslinted the typescript/html files
This commit is contained in:
2020-10-11 10:56:29 +05:30
parent b31db593c2
commit d677cfb1ea
505 changed files with 7559 additions and 5649 deletions
+9 -18
View File
@@ -1,12 +1,14 @@
import {Injectable} from '@angular/core';
import {Observable} from 'rxjs/internal/Observable';
import {throwError} from 'rxjs';
import { Injectable } from '@angular/core';
import { throwError } from 'rxjs';
import { Observable } from 'rxjs/internal/Observable';
@Injectable({
providedIn: 'root'
providedIn: 'root',
})
export class ErrorLoggerService {
constructor() {
public static log(serviceName = 'error-logger', message: string) {
// eslint-disable-next-line no-console
console.log(`${serviceName}Service: ${message}`);
}
/**
@@ -15,22 +17,11 @@ export class ErrorLoggerService {
* @param operation - name of the operation that failed
* @param result - optional value to return as the observable result
*/
// eslint-disable-next-line @typescript-eslint/no-unused-vars, class-methods-use-this
public handleError<T>(serviceName = 'error-logger', operation = 'operation', result?: T) {
return (error: any): Observable<T> => {
// TODO: send the error to remote logging infrastructure
console.error(error); // log to console instead
// TODO: better job of transforming error for user consumption
this.log(serviceName, `${operation} failed: ${error.message}`);
// // Let the app keep running by returning an empty result.
// return of(result as T);
ErrorLoggerService.log(serviceName, `${operation} failed: ${error}`);
return throwError(error);
};
}
public log(serviceName = 'error-logger', message: string) {
console.log(serviceName + 'Service: ' + message);
}
}