Mensajes de error

Para obtener mensajes de error, utilice la clase Exception (Excepciones). Utilice las construcciones "try/catch" (intentar/capturar) para capturar el mensaje de error. Por ejemplo:

try{ 
		Server *server=new Server(); 
		
		//Connect to server 
		server->connect(); 
		
		}catch(Exception e) 
		{ 
		 // ASCII Version-use the following code 
		cout << "Error Occurs," << e.getErrorMessage(); 
		//Unicode Version -use the following code 
		
		UnicodeString error = e.getErrorMessage() ; 
			
		wcout << error.getTerminatedBuffer(); 
		}

La API C++ utiliza los siguientes mensajes de error:

  • Mensajes de error para conexión:
    • "Connection type not supported"
    • "Client timeout"
    • "Blank connection property name"
    • "Blank property name"
  • Mensajes de error para la creación de tablas de datos:
    • "Blank column name"
    • "Duplicated column name"
    • "The column index is invalid"
  • Mensajes de error para la excepción MessagePackaging:
    • "Input Message is null"
    • "Failed to connect to Server"
    • "Failed to disconnect from Server"
    • "Failed to open Http Connection"
    • "Failed to get Service"
    • "Failed to package the message using Serializer and Encoding"