HM Error Message Handling
I have made the HM as server and I have written a small application as client,
Client will send request to the HM like loading file,hiding the assembly etc via sockets and it is working fine.
I have written a function to query the xyz of the node. It is working fine as long as the node is in the model.
My script has this:
Answers
-
Hi
I think hm will not throw an error to server, just a message
anyway i think your code should be:
if {[hm_entityinfo exist nodes $nodeID]} {
lassign [expr [hm_nodevalue $nodeID]] x y z
#return value to client return [list $x $y $z]
} else {
tk_messageBox -title 'Error node not found' -message 'Node $nodeID not found in current model' -icon error
#return a message to client return '...'
}
no need 'hm_blockerrormessages' because above code will not raise any error
ps: your 'catch' command look strange
usually i will write :
if {[ catch {set nodeXYZ ... } ]} {
#show error
}
0 -
Hi tinh
Thanks for your response.
I'll try and let you know.
0 -
I think it works fine.
Thanks for your response.
0