1
1
import log from 'electron-log' ;
2
- import { dblDotLocalConfig } from '../constants/dblDotLocal.constants' ;
2
+ import dblDotLocalConstants from '../constants/dblDotLocal.constants' ;
3
3
import { dblDotLocalService } from '../services/dbl_dot_local.service' ;
4
4
import { history } from '../store/configureStore' ;
5
5
import { navigationConstants } from '../constants/navigation.constants' ;
@@ -30,21 +30,21 @@ export function loadHtmlBaseUrl() {
30
30
}
31
31
} ;
32
32
function requestBaseUrl ( ) {
33
- return { type : dblDotLocalConfig . HTML_BASE_URL_REQUEST } ;
33
+ return { type : dblDotLocalConstants . HTML_BASE_URL_REQUEST } ;
34
34
}
35
35
function success ( dblBaseUrl ) {
36
- return { type : dblDotLocalConfig . HTML_BASE_URL_RESPONSE , dblBaseUrl } ;
36
+ return { type : dblDotLocalConstants . HTML_BASE_URL_RESPONSE , dblBaseUrl } ;
37
37
}
38
38
function failure ( error ) {
39
- return { type : dblDotLocalConfig . CONFIG_REQUEST_FAILURE , error } ;
39
+ return { type : dblDotLocalConstants . CONFIG_REQUEST_FAILURE , error } ;
40
40
}
41
41
}
42
42
43
43
export function getDblDotLocalExecStatus ( ) {
44
44
return async dispatch => {
45
45
const { isRunning } = await dblDotLocalService . getDblDotLocalExecStatus ( ) ;
46
46
return dispatch ( {
47
- type : dblDotLocalConfig . DBL_DOT_LOCAL_PROCESS_STATUS ,
47
+ type : dblDotLocalConstants . DBL_DOT_LOCAL_PROCESS_STATUS ,
48
48
isRunning
49
49
} ) ;
50
50
} ;
@@ -64,18 +64,22 @@ export function gotoWorkspaceLoginPage(workspace) {
64
64
configXmlFile
65
65
) ;
66
66
dblDotLocalExecProcess . stderr . on ( 'data' , data => {
67
- // log.error( data) ;
68
- const [ , errorMessage ] = ` ${ data } ` . split (
67
+ const dataString = ` ${ data } ` ;
68
+ const [ , errorMessage ] = dataString . split (
69
69
'dbl_dot_local.dbl_app.DblAppException:'
70
70
) ;
71
71
if ( errorMessage ) {
72
72
dispatch ( alertActions . error ( { message : errorMessage } ) ) ;
73
+ } else if ( dataString . includes ( 'File "' ) ) {
74
+ log . error ( dataString , {
75
+ [ dblDotLocalConstants . DDL_APPENDER_ID ] : true
76
+ } ) ;
73
77
}
74
78
} ) ;
75
79
[ 'error' , 'close' , 'exit' ] . forEach ( event => {
76
80
dblDotLocalExecProcess . on ( event , dblDotLocalExecProcessCode => {
77
81
dispatch ( {
78
- type : dblDotLocalConfig . STOP_WORKSPACE_PROCESS_DONE ,
82
+ type : dblDotLocalConstants . STOP_WORKSPACE_PROCESS_DONE ,
79
83
dblDotLocalExecProcess,
80
84
dblDotLocalExecProcessCode
81
85
} ) ;
@@ -104,7 +108,7 @@ export function gotoWorkspaceLoginPage(workspace) {
104
108
dblDotLocalExecProcess
105
109
) {
106
110
return {
107
- type : dblDotLocalConfig . START_WORKSPACE_PROCESS ,
111
+ type : dblDotLocalConstants . START_WORKSPACE_PROCESS ,
108
112
fullPath,
109
113
configXmlFile,
110
114
dblDotLocalExecProcess
@@ -113,9 +117,9 @@ export function gotoWorkspaceLoginPage(workspace) {
113
117
}
114
118
115
119
export function incrementErrorLogCount ( ) {
116
- return { type : dblDotLocalConfig . DDL_ERROR_LOG_COUNT_INCREMENT } ;
120
+ return { type : dblDotLocalConstants . DDL_ERROR_LOG_COUNT_INCREMENT } ;
117
121
}
118
122
119
123
export function resetErrorLogCount ( ) {
120
- return { type : dblDotLocalConfig . DDL_ERROR_LOG_COUNT_RESET } ;
124
+ return { type : dblDotLocalConstants . DDL_ERROR_LOG_COUNT_RESET } ;
121
125
}
0 commit comments