errorMessage¶
Gets the text of the error message from the last function called.
Synopsis¶
errorMessage ()
Return Value¶
Returns the current error message.
Description¶
If the current error type is positive then the last error message set is
returned. It does not matter if the error message was printed or not. The
current error type is the number returned by
errorType. If the current error type is zero then
None
is returned.
The returned string can be freed using free.
Example¶
This example retrieves the error message from a call to wilcoxonRankSum with an illegal argument.
from __future__ import print_function
from pyimsl.stat.free import free
from pyimsl.stat.wilcoxonRankSum import wilcoxonRankSum
from pyimsl.stat.errorMessage import errorMessage
from pyimsl.stat.errorType import errorType
x = [0, 1, 2]
y = [0, 1, 2]
p = wilcoxonRankSum(x, y)
msg = errorMessage()
type = errorType()
print("type = %d\nmsg = %s\n" % (type, msg))
Output¶
***
*** Warning error issued from IMSL function wilcoxonRankSum:
*** At least one tie is detected between the samples.
***
type = 3
msg = At least one tie is detected between the samples.