minor documentation fix
[senf.git] / Utils / Exception.test.cc
index bf40f0c..3e51428 100644 (file)
@@ -1,8 +1,8 @@
 // $Id$
 //
-// Copyright (C) 2007 
-// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
-// Kompetenzzentrum fuer Satelitenkommunikation (SatCom)
+// Copyright (C) 2007
+// Fraunhofer Institute for Open Communication Systems (FOKUS)
+// Competence Center NETwork research (NET), St. Augustin, GERMANY
 //     Stefan Bund <g0dil@berlios.de>
 //
 // This program is free software; you can redistribute it and/or modify
 
 BOOST_AUTO_UNIT_TEST(errnoException)
 {
-    BOOST_CHECK_THROW( senf::throwErrno(), senf::SystemException );
-    BOOST_CHECK_THROW( senf::throwErrno(ENOENT), senf::SystemException );
-    BOOST_CHECK_THROW( senf::throwErrno(""), senf::SystemException );
-    BOOST_CHECK_THROW( senf::throwErrno("", ENOENT), senf::SystemException );
-
     try {
         try {
-            senf::throwErrno("::open()", ENOENT);
+            throw senf::SystemException("::open()", ENOENT);
         }
-        catch(senf::SystemException & e) {
-            e << ": x=" << 1 << boost::format(", y=%d") % 2;
+        catch(senf::Exception & e) {
+            e << "\nx=" << 1 << boost::format("\ny=%d") % 2;
             throw;
         }
     }
     catch (senf::SystemException & e) {
         BOOST_CHECK_EQUAL( e.errorNumber(), ENOENT );
-        BOOST_CHECK_EQUAL( e.what(), "::open(): (2) No such file or directory: x=1, y=2" );
+        BOOST_CHECK_EQUAL( e.errorString(), "No such file or directory");
     }
 }