mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
Migrate from window.console to LogService
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { AlfrescoApiService } from 'ng2-alfresco-core';
|
||||
import { AlfrescoApiService, LogService } from 'ng2-alfresco-core';
|
||||
import { ExternalContent } from '../components/widgets/core/external-content';
|
||||
import { ExternalContentLink } from '../components/widgets/core/external-content-link';
|
||||
import { AlfrescoApi } from 'alfresco-js-api';
|
||||
@@ -28,7 +28,8 @@ export class ActivitiAlfrescoContentService {
|
||||
static UNKNOWN_ERROR_MESSAGE: string = 'Unknown error';
|
||||
static GENERIC_ERROR_MESSAGE: string = 'Server error';
|
||||
|
||||
constructor(private apiService: AlfrescoApiService) {
|
||||
constructor(private apiService: AlfrescoApiService,
|
||||
private logService: LogService) {
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -85,7 +86,7 @@ export class ActivitiAlfrescoContentService {
|
||||
errMsg = (error.message) ? error.message :
|
||||
error.status ? `${error.status} - ${error.statusText}` : ActivitiAlfrescoContentService.GENERIC_ERROR_MESSAGE;
|
||||
}
|
||||
console.error(errMsg);
|
||||
this.logService.error(errMsg);
|
||||
return Observable.throw(errMsg);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user