Function documentationCommunicationError Class (sdb.dbm Module) Locate this document in the navigation structure

 

CommunicationError is a class of the sdb.dbm module. The methods of the sdb.dbm module trigger exceptions of this class if it is not possible to connect to the DBM server or if an existing connection is terminated.

Class CommunicationError: Attributes its Objects

Name

Description

errorCode

Error code

message

Error message text

Example

You have entered an incorrect computer name (PRAMA instead of PRAMA):

Syntax Syntax

  1. try:
      session = sdb.dbm.DBM ('PRAMA', '')
    except sdb.dbm.CommunicationError, err:
      print err
      print err.message
    
End of the code.
Result

dbm.CommunicationError: [-4] unknown host name

unknown host name