Index: lemon/arg_parser.cc
===================================================================
--- lemon/arg_parser.cc	(revision 2406)
+++ lemon/arg_parser.cc	(revision 2410)
@@ -27,6 +27,6 @@
   }
 
-  ArgParser::ArgParser(int argc, char **argv) :_argc(argc), _argv(argv),
-					       _command_name(argv[0]) {
+  ArgParser::ArgParser(int argc, const char **argv) :_argc(argc), _argv(argv),
+                                                     _command_name(argv[0]) {
     funcOption("-help","Print a short help message",_showHelp,this);
     synonym("help","-help");
@@ -135,6 +135,6 @@
 
   ArgParser &ArgParser::refOption(const std::string &name,
-			       const std::string &help,
-			       double &ref, bool obl)
+                                  const std::string &help,
+                                  double &ref, bool obl)
   {
     ParData p;
@@ -149,6 +149,6 @@
 
   ArgParser &ArgParser::refOption(const std::string &name,
-			       const std::string &help,
-			       bool &ref, bool obl)
+                                  const std::string &help,
+                                  bool &ref, bool obl)
   {
     ParData p;
@@ -198,11 +198,10 @@
   {
     Opts::iterator i = _opts.find(opt);
-    if(i==_opts.end()) throw LogicError();
-    else if(i->second.ingroup) throw LogicError();
-    else {
-      GroupData &g=_groups[group];
-      g.opts.push_back(opt);
-      i->second.ingroup=true;
-    }
+    LEMON_ASSERT(i!=_opts.end(), "Unknown option: '"+opt+"'");
+    LEMON_ASSERT(!(i->second.ingroup), 
+                 "Option already in option group: '"+opt+"'");
+    GroupData &g=_groups[group];
+    g.opts.push_back(opt);
+    i->second.ingroup=true;
     return *this;
   }
@@ -220,14 +219,12 @@
     Opts::iterator o = _opts.find(opt);
     Opts::iterator s = _opts.find(syn);
-    if(o==_opts.end()||s!=_opts.end())
-      throw LogicError();
-    else {
-      ParData p;
-      p.help=opt;
-      p.mandatory=false;
-      p.syn=true;
-      _opts[syn]=p;
-      o->second.has_syn=true;
-    }
+    LEMON_ASSERT(o!=_opts.end(), "Unknown option: '"+opt+"'");
+    LEMON_ASSERT(s==_opts.end(), "Option already used: '"+syn+"'");
+    ParData p;
+    p.help=opt;
+    p.mandatory=false;
+    p.syn=true;
+    _opts[syn]=p;
+    o->second.has_syn=true;
     return *this;
   }
Index: lemon/arg_parser.h
===================================================================
--- lemon/arg_parser.h	(revision 2407)
+++ lemon/arg_parser.h	(revision 2410)
@@ -48,5 +48,5 @@
     
     int _argc;
-    char **_argv;
+    const char **_argv;
     
     enum OptType { UNKNOWN=0, BOOL=1, STRING=2, DOUBLE=3, INTEGER=4, FUNC=5 };
@@ -108,5 +108,5 @@
 
     ///\e
-    ArgParser(int argc, char **argv);
+    ArgParser(int argc, const char **argv);
 
     ~ArgParser();
Index: lemon/error.h
===================================================================
--- lemon/error.h	(revision 2391)
+++ lemon/error.h	(revision 2410)
@@ -476,7 +476,9 @@
 
   template <typename Exception>
-  inline void assert_fail(const char *file, int line, const char *func,
-		   Exception exception, const char *assertion = 0,
-		   bool do_abort=true)
+  inline void assert_fail(const char *file, int line, 
+                          const char *func,
+                          Exception exception, 
+                          const char *assertion = 0,
+                          bool do_abort=true)
   {
     using namespace std;
@@ -511,4 +513,14 @@
   }
 
+  template <>
+  inline void assert_fail<std::string>(const char *file, int line, 
+                                       const char *func,
+                                       std::string message, 
+                                       const char *assertion,
+                                       bool do_abort)
+  {
+    assert_fail(file, line, func, message.c_str(), assertion, do_abort);
+  }
+
   template <typename Exception>
   inline void assert_fail_failure(const char *file, int line, const char *func,
@@ -522,10 +534,20 @@
   template <>
   inline void assert_fail_failure<const char *>(const char *file, int line, 
-					 const char *func,
-					 const char *message, 
-					 const char *assertion,
-					 bool)
+                                                const char *func,
+                                                const char *message, 
+                                                const char *assertion,
+                                                bool)
   {
     throw AssertionFailedError(file, line, func, message, assertion);
+  }
+
+  template <>
+  inline void assert_fail_failure<std::string>(const char *file, int line, 
+                                               const char *func,
+                                               std::string message, 
+                                               const char *assertion,
+                                               bool)
+  {
+    assert_fail_failure(file, line, func, message.c_str(), assertion, true);
   }
 
@@ -546,4 +568,14 @@
   {
     throw AssertionFailedError(file, line, func, message, assertion);
+  }
+
+  template <>
+  inline void assert_fail_exception<std::string>(const char *file, int line, 
+                                                 const char *func,
+                                                 std::string message, 
+                                                 const char *assertion,
+                                                 bool)
+  {
+    assert_fail_exception(file, line, func, message.c_str(), assertion, true);    
   }
 
