Exceptions of the classCommunicationError are raised if no connection can be made to the Database Manager, or if an existing connection has been broken.
Instances of the CommunicationError class have the following attributes:
Attribute |
Description |
errorCode |
Error code |
message |
Error message text |
Computer p56789 to which you are trying to connect does not exist:
try:
session =
sapdb.dbm.DBM ('p56789t', '')
except sapdb.dbm.CommunicationError, err:
print err
print
err.message
Result:
dbm.CommunicationError: [-4] unknown host name
unknown host name