diff options
Diffstat (limited to 'odb/error.cxx')
-rw-r--r-- | odb/error.cxx | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/odb/error.cxx b/odb/error.cxx new file mode 100644 index 0000000..649efce --- /dev/null +++ b/odb/error.cxx @@ -0,0 +1,29 @@ +// file : odb/error.cxx +// author : Boris Kolpackov <boris@codesynthesis.com> +// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC +// license : GNU GPL v3; see accompanying LICENSE file + +#include <iostream> + +#include <odb/error.hxx> + +using namespace std; + +std::ostream& +error (cutl::fs::path const& p, size_t line, size_t clmn) +{ + errorcount++; + cerr << p << ':' << line << ':' << clmn << ": error: "; + return cerr; +} + +std::ostream& +error (location_t loc) +{ + errorcount++; + cerr << LOCATION_FILE (loc) << ':' + << LOCATION_LINE (loc) << ':' + << LOCATION_COLUMN (loc) << ':' + << " error: "; + return cerr; +} |