Changed uses of std::abort to assert's with better description
authorFelipe Magno de Almeida <felipe@expertisesolutions.com.br>
Fri, 18 Jul 2014 00:47:23 +0000 (21:47 -0300)
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>
Fri, 18 Jul 2014 21:57:14 +0000 (18:57 -0300)
src/bin/eolian_cxx/eolian_cxx.cc

index 93064bc..d68548c 100644 (file)
@@ -183,7 +183,7 @@ run(options_type const& opts)
    EINA_CXX_DOM_LOG_ERR(eolian_cxx::domain)
      << "Error generating: " << class_name(*klass)
      << std::endl;
-   std::abort();
+   assert(false && "error generating class");
 }
 
 static void
@@ -201,7 +201,7 @@ database_load(options_type const& opts)
      {
         EINA_CXX_DOM_LOG_ERR(eolian_cxx::domain)
           << "Eolian failed parsing eot files";
-        std::abort();
+        assert(false && "Error parsing eot files");
      }
    if (!opts.in_file.empty())
      {
@@ -209,14 +209,14 @@ database_load(options_type const& opts)
           {
              EINA_CXX_DOM_LOG_ERR(eolian_cxx::domain)
                << "Failed parsing: " << opts.in_file << ".";
-             std::abort();
+             assert(false && "Error parsing input file");
           }
      }
    if (!::eolian_all_eo_files_parse())
      {
         EINA_CXX_DOM_LOG_ERR(eolian_cxx::domain)
           << "Eolian failed parsing input files";
-        std::abort();
+        assert(false && "Error parsing input files");
      }
 }
 
@@ -327,7 +327,7 @@ opts_get(int argc, char **argv)
    if (!eolian_cxx::opts_check(opts))
      {
         _usage(argv[0]);
-        std::abort();
+        assert(false && "Wrong options passed in command-line");
      }
 
    return opts;