summaryrefslogtreecommitdiff
path: root/src/context.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2012-05-14 21:36:42 -0600
committerJohn Wiegley <johnw@newartisans.com>2012-05-14 21:44:00 -0600
commitf4f3058b8cd75c04080f9b68cb54b9584eafb39f (patch)
treeeca9ca6ceca001209fb93c05b52e21031280d18c /src/context.h
parent96172669053bbba7263a370f109f70615049a0c6 (diff)
downloadfork-ledger-f4f3058b8cd75c04080f9b68cb54b9584eafb39f.tar.gz
fork-ledger-f4f3058b8cd75c04080f9b68cb54b9584eafb39f.tar.bz2
fork-ledger-f4f3058b8cd75c04080f9b68cb54b9584eafb39f.zip
Switch to using Boost.Format
Diffstat (limited to 'src/context.h')
-rw-r--r--src/context.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/context.h b/src/context.h
index 45bb9990..09734b3e 100644
--- a/src/context.h
+++ b/src/context.h
@@ -103,6 +103,9 @@ public:
void warning(const string& what) const {
warning_func(location() + what);
}
+ void warning(const boost::format& what) const {
+ warning_func(location() + string(what.str()));
+ }
};
inline parse_context_t open_for_reading(const path& pathname,
@@ -112,7 +115,7 @@ inline parse_context_t open_for_reading(const path& pathname,
if (! exists(filename))
throw_(std::runtime_error,
- _("Cannot read journal file %1") << filename);
+ _f("Cannot read journal file %1%") % filename);
#if BOOST_VERSION >= 104600 && BOOST_FILESYSTEM_VERSION >= 3
path parent(filesystem::absolute(pathname, cwd).parent_path());