diff options
author | John Wiegley <johnw@newartisans.com> | 2009-02-26 04:41:38 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-02-26 04:41:38 -0400 |
commit | fbb734689b8989bb8bc5df8217b1469e084ca64b (patch) | |
tree | 2384d5cad88c82c50c885d24efa2e1129815b2b2 /src/error.h | |
parent | 513e2b59eb71de874cf685f887d74fc3b7792d8f (diff) | |
download | fork-ledger-fbb734689b8989bb8bc5df8217b1469e084ca64b.tar.gz fork-ledger-fbb734689b8989bb8bc5df8217b1469e084ca64b.tar.bz2 fork-ledger-fbb734689b8989bb8bc5df8217b1469e084ca64b.zip |
Added a new source_context function
Diffstat (limited to 'src/error.h')
-rw-r--r-- | src/error.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/error.h b/src/error.h index 2c0c4d09..1b4c7e12 100644 --- a/src/error.h +++ b/src/error.h @@ -81,6 +81,11 @@ string line_context(const string& line, std::size_t pos = 0, std::size_t end_pos = 0); +string source_context(const path& file, + std::size_t pos, + std::size_t end_pos, + const string& prefix = ""); + #define DECLARE_EXCEPTION(name, kind) \ class name : public kind { \ public: \ |