root/library/bdm/bdmerror.cpp @ 1064

Revision 1064, 0.8 kB (checked in by mido, 14 years ago)

astyle applied all over the library

  • Property svn:eol-style set to native
RevLine 
[565]1#include "bdmerror.h"
2#include <iostream>
3#include <iomanip>
4#include <stdexcept>
5
6namespace bdm {
7
[737]8void bdm_assert_f ( const std::string &ass, const std::string &msg, const std::string &file, int line ) {
[1064]9    std::ostringstream error;
10    error << "*** Assertion failed in " << file << " on line " << line
11          << ":\n" << msg << " (" << ass << ")\n";
12    throw std::runtime_error ( error.str() );
[565]13}
14
[737]15void bdm_error_f ( const std::string &msg, const std::string &file, int line ) {
[1064]16    std::ostringstream error;
17    error << "*** Error in " << file << " on line " << line << ":\n"
18          << msg << "\n";
19    throw std::runtime_error ( error.str() );
[565]20}
21
[737]22void bdm_warning_f ( const std::string &msg, const std::string &file, int line ) {
[1064]23    std::cerr << "*** Warning in " << file << " on line " << line << ":\n"
24              << msg << std::endl;
[565]25}
26
27}
Note: See TracBrowser for help on using the browser.