Commit 29a2eb6f authored by Yori Fournier's avatar Yori Fournier
Browse files

Merge branch '102-for_dev' into 'dev'

Resolve "[Bug] transmitting error message back to client fails"

Closes #102

See merge request !71
parents 5772ac56 55be37c1
Pipeline #711 failed with stage
in 4 minutes and 43 seconds
......@@ -298,9 +298,15 @@ class MplClient():
if isinstance(formated_data, Status):
if formated_data.value:
print('This should not happen')
print('WARNING: This should not happen...')
print('Client recieved an Error with success status (True):')
else:
print('instead of answer a error was received')
print('instead of answer an error was received:')
# Print error message
print(str(formated_data.content))
datas = (None,)
else:
# set the figure data to answerSig.value
......
......@@ -88,13 +88,13 @@ class MplHandler(SocketServer.StreamRequestHandler):
print(SPCE + "SERVER: I tried: "
+ str(fig_class.__name__)
+ '(' + str(datas) + ', ' + str(kwargs) + ')')
print(SPCE + "SERVER: Exception details where:",
e.message, e.args)
print(SPCE + "SERVER: Exception details where:"
+ str(e.args))
return Status(False, "I could not create the requested "
"Figure. I tried: " + str(fig_class.__name__)
+ '(' + str(datas) + ', ' + str(kwargs) + ')'
+ " Exception details where:"
+ str(e.message) + str(e.args))
+ str(e.args))
# add the figure to the global index
self.server._figures[fig.get_fig_id()] = fig
......@@ -136,11 +136,10 @@ class MplHandler(SocketServer.StreamRequestHandler):
except Exception as e:
if debug:
print(WARN + "I couldn't format the rawdata.")
print(SPCE + "SERVER: Exception details where:",
e.message,
e.args)
print(SPCE + "SERVER: Exception details where:" +
str(e.args))
return Status(False, "I couldn't format the rawdata."\
" Exception details where:" + str(e.message) + str(e.args))
" Exception details where:" + str(e.args))
# compose the formated data
datas = tuple(ax.data for ax in fig.get_axes())
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment