From fbb734689b8989bb8bc5df8217b1469e084ca64b Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 26 Feb 2009 04:41:38 -0400 Subject: Added a new source_context function --- src/error.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/error.h') 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: \ -- cgit v1.2.3