AW: [omniORB] Problems catching exceptions in clients
evgeni.rojkov at durr.com
evgeni.rojkov at durr.com
Fri Apr 11 10:55:18 BST 2008
... could yout try "throw new MysqlPackage::Mysql::MysqlException(...);"
... just try to add this "new".
Kind Regards, Evgeni
-----Ursprüngliche Nachricht-----
Von: omniorb-list-bounces at omniorb-support.com
[mailto:omniorb-list-bounces at omniorb-support.com] Im Auftrag von Silly &
Chrischi
Gesendet: Donnerstag, 10. April 2008 19:14
An: omniorb-list at omniorb-support.com
Betreff: [omniORB] Problems catching exceptions in clients
Hello Guys,
i have problems catching exceptions thrown by the server.
Here ist a part of my idl:
module MysqlPackage {
interface Mysql {
exception MysqlException {
string reason;
};
};
};
I throw the exception by the server and her eis my code for it:
if(mysql_errno(mysqlDatabase) != 0){
throw MysqlPackage::Mysql::MysqlException("MySQL-Error");
}
But now, if i would like to catch the exception, i get a message by the
server, that sound like this:
"omniORB: WARNING - method 'xx' on: root<1> raised the exception:
IDL:MysqlPackage/Mysql/MysqlException:1.0"
I used the following statement to catch my exception:
catch (const MysqlPackage::Mysql::MysqlException::Exception& ex){
cout << "ERROR: " << ex._name() << endl;
}
Thank you for your help. I don't know what to do.
Christian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20080411/087c8b35/attachment.htm
More information about the omniORB-list
mailing list