00001 /* 00002 cabal_error.h 00003 Error classes - for throw statements. 00004 00005 $Id: cabal_error.cpp,v 1.3 2004/03/15 04:22:34 jonnymind Exp $ 00006 --------------------------------------------- 00007 Begin : 2003-08-15 17:40 00008 Author : Giancarlo Niccolai 00009 00010 Last modified because: 00011 00012 */ 00013 00014 /************************************************************************** 00015 * This program is free software; you can redistribute it and/or modify * 00016 * it under the terms of the GNU Library General Public License as * 00017 * published by the Free Software Foundation; either version 2.1 of the * 00018 * License, or (at your option) any later version. * 00019 ***************************************************************************/ 00020 00021 #ifdef __MSC_VER 00022 #pragma warning ( disable : 4786 ) 00023 #endif 00024 00025 #include <cabal_error.h> 00026 #include <cabal_os.h> 00027 00028 namespace Cabal { 00029 00030 std::ostream& operator<<( std::ostream &stream, Error &err ) 00031 { 00032 stream << err.className() << ": " << err.description() << " (" << 00033 err.osCode() << ": " << Net::errorDescription( err.osCode() ) << ")"; 00034 return stream; 00035 } 00036 00037 00038 }