uniba-swt / swtbahn-cli

A client-server command line interface for the SWTbahn.
GNU General Public License v3.0
7 stars 3 forks source link

Include more detailed reason for failure in engine upload process when compilation fails #41

Closed BLuedtke closed 2 years ago

BLuedtke commented 2 years ago

File in question: server/src/handler_upload.c
Method: handler_upload_engine

The compilation of a train engine could fail in the C compilation OR the shared library compilation. This is not reflected in the log message:

dynlib_status status = dynlib_compile_scchart(filepath, engine_dir);
if (status == DYNLIB_COMPILE_SCCHARTS_C_ERR || status == DYNLIB_COMPILE_SHARED_SCCHARTS_ERR) {
    syslog_server(LOG_ERR, "Request: Upload - engine file %s could not be compiled", filepath);
    [....]
}

Request: Note the reason which compilation failed in the log message.