Commit 5f1e7c3e authored by Oliver Bock's avatar Oliver Bock
Browse files

Catch std::logic_error exceptions

parent 2b90f3e8
......@@ -20,6 +20,19 @@
#include "ResourceCompiler.h"
#include <cstdlib>
#include <string>
#include <map>
#include <vector>
#include <iostream>
#include <fstream>
#include <sstream>
#include <iterator>
#include <stdexcept>
using namespace std;
ResourceCompiler::ResourceCompiler(const string inputFilename, const string outputFilename)
{
m_ResourceSpecFile = inputFilename;
......@@ -101,6 +114,9 @@ void ResourceCompiler::compile()
catch(const ios::failure& error) {
cerr << "Error during output file processing: " << error.what() << endl;
}
catch(const std::logic_error& error) {
cerr << "Error during output file processing: " << error.what() << endl;
}
// clean up and clode file
outputFile.flush();
......@@ -149,6 +165,9 @@ void ResourceCompiler::parseInputFile()
cerr << "Error during input file processing: " << error.what();
}
}
catch(const std::logic_error& error) {
cerr << "Error during input file processing: " << error.what() << endl;
}
// close input file
inputFile.close();
......
......@@ -21,17 +21,6 @@
#ifndef RESOURCECOMPILER_H_
#define RESOURCECOMPILER_H_
#include <cstdlib>
#include <string>
#include <map>
#include <vector>
#include <iostream>
#include <fstream>
#include <sstream>
#include <iterator>
using namespace std;
/**
* \addtogroup orc Open Resource Compiler
* @{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment