Commit 7cf2b46f authored by Yori Fournier's avatar Yori Fournier
Browse files

Merge branch '102-transmitting-error-message-fails' into '_compatible_ppd'

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

See merge request !70
parents 73155fbe 8bbfc310
Pipeline #689 canceled with stage
......@@ -323,9 +323,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
......
......@@ -118,13 +118,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
......@@ -166,11 +166,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