mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Migrate from window.console to LogService
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { AlfrescoApiService } from './alfresco-api.service';
|
||||
import { LogService } from './log.service';
|
||||
|
||||
/**
|
||||
* RenditionsService
|
||||
@@ -27,7 +28,8 @@ import { AlfrescoApiService } from './alfresco-api.service';
|
||||
@Injectable()
|
||||
export class RenditionsService {
|
||||
|
||||
constructor(private apiService: AlfrescoApiService) {
|
||||
constructor(private apiService: AlfrescoApiService,
|
||||
private logService: LogService) {
|
||||
|
||||
}
|
||||
|
||||
@@ -75,7 +77,7 @@ export class RenditionsService {
|
||||
}
|
||||
|
||||
private handleError(error: any): Observable<any> {
|
||||
console.error(error);
|
||||
this.logService.error(error);
|
||||
return Observable.throw(error || 'Server error');
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user