From f4f3058b8cd75c04080f9b68cb54b9584eafb39f Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Mon, 14 May 2012 21:36:42 -0600 Subject: Switch to using Boost.Format --- src/item.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/item.cc') diff --git a/src/item.cc b/src/item.cc index 17d46652..de5ffef2 100644 --- a/src/item.cc +++ b/src/item.cc @@ -270,16 +270,16 @@ namespace { return item.has_tag(args.get(0)); else throw_(std::runtime_error, - _("Expected string or mask for argument 1, but received %1") - << args[0].label()); + _f("Expected string or mask for argument 1, but received %1%") + % args[0].label()); } else if (args.size() == 2) { if (args[0].is_mask() && args[1].is_mask()) return item.has_tag(args.get(0), args.get(1)); else throw_(std::runtime_error, - _("Expected masks for arguments 1 and 2, but received %1 and %2") - << args[0].label() << args[1].label()); + _f("Expected masks for arguments 1 and 2, but received %1% and %2%") + % args[0].label() % args[1].label()); } else if (args.size() == 0) { throw_(std::runtime_error, _("Too few arguments to function")); @@ -302,16 +302,16 @@ namespace { val = item.get_tag(args.get(0)); else throw_(std::runtime_error, - _("Expected string or mask for argument 1, but received %1") - << args[0].label()); + _f("Expected string or mask for argument 1, but received %1%") + % args[0].label()); } else if (args.size() == 2) { if (args[0].is_mask() && args[1].is_mask()) val = item.get_tag(args.get(0), args.get(1)); else throw_(std::runtime_error, - _("Expected masks for arguments 1 and 2, but received %1 and %2") - << args[0].label() << args[1].label()); + _f("Expected masks for arguments 1 and 2, but received %1% and %2%") + % args[0].label() % args[1].label()); } else if (args.size() == 0) { throw_(std::runtime_error, _("Too few arguments to function")); -- cgit v1.2.3