Hi Alexander,
In python I have a way to get messages and errors. This sample shows some ways to do so and we have a messages method in the docs:
messages()
This is a Python list object to which the module
appends tuples (exception class and exception object) for all messages that the
module receives for this connection. An error on any cursor obtained from the same
connection object, is appended to the messages attribute of the connection object of
the cursor.
appends tuples (exception class and exception object) for all messages that the
module receives for this connection. An error on any cursor obtained from the same
connection object, is appended to the messages attribute of the connection object of
the cursor.
connection.messages()
Usage example:
try:
cur.execute("select ...")
except sybpydb.Error:
for err in cur.connection.messages:
print("Exception %s, Value %s", % err[0], err[1])
Also, on connection:
conn = sybpydb.connect(user='sa', password='secret', dsn='servername=pvw71572;charset=cp1252')
for mess in conn.messages:
print("Warning: %s " % mess[1][0])
And for errors:
try:
cur.execute("raiserror 99999 'This is a raiserror'")
while True:
row = cur.fetchone()
if (not row):
break
except sybpydb.Error as e:
print ('Error: %s' %(e))
Cheers,
-Paul