openvidu-server: custom layouts path initialization error message improved

pull/203/head
pabloFuente 2019-02-13 12:52:35 +01:00
parent d4e78636bf
commit b2dd9e537a
2 changed files with 9 additions and 4 deletions

View File

@ -245,6 +245,10 @@ public class OpenViduServer implements JsonRpcConfigurer {
finalErrorMessage = "Error initializing recording path \""
+ this.openviduConfig().getOpenViduRecordingPath()
+ "\" set with system property \"openvidu.recording.path\". Shutting down OpenVidu Server";
} else if (e.getCodeValue() == Code.RECORDING_FILE_EMPTY_ERROR.getValue()) {
finalErrorMessage = "Error initializing recording custom layouts path \""
+ this.openviduConfig().getOpenviduRecordingCustomLayout()
+ "\" set with system property \"openvidu.recording.custom-layout\". Shutting down OpenVidu Server";
}
log.error(finalErrorMessage);
System.exit(1);

View File

@ -569,16 +569,17 @@ public class RecordingManager {
+ "\" is not valid. Reason: OpenVidu Server needs read permissions. Try running command \"sudo chmod 755 "
+ openviduConfig.getOpenviduRecordingCustomLayout() + "\"";
log.error(errorMessage);
throw new OpenViduException(Code.RECORDING_PATH_NOT_VALID, errorMessage);
throw new OpenViduException(Code.RECORDING_FILE_EMPTY_ERROR, errorMessage);
} else {
log.info("OpenVidu Server has read permissions on custom layout path: {}",
openviduConfig.getOpenviduRecordingCustomLayout());
}
} else {
String errorMessage = "The custom layouts path \"" + recordingPathString
+ "\" is not valid. Reason: OpenVidu Server cannot find path \"" + recordingPathString + "\"";
String errorMessage = "The custom layouts path \"" + openviduConfig.getOpenviduRecordingCustomLayout()
+ "\" is not valid. Reason: OpenVidu Server cannot find path \""
+ openviduConfig.getOpenviduRecordingCustomLayout() + "\"";
log.error(errorMessage);
throw new OpenViduException(Code.RECORDING_PATH_NOT_VALID, errorMessage);
throw new OpenViduException(Code.RECORDING_FILE_EMPTY_ERROR, errorMessage);
}
}