Skip to content

Commit

Permalink
Merge pull request jackwadden#6 from jackwadden/revert-5-master
Browse files Browse the repository at this point in the history
Revert "Error message check created"
  • Loading branch information
jackwadden committed Jun 17, 2016
2 parents b26e033 + b1ed3f5 commit 2280fcb
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions src/main.cpp
@@ -1,4 +1,4 @@
//Hello at the top
//
#include "automata.h"
#include "pass.h"
#include "profiler.h"
Expand All @@ -9,7 +9,6 @@
#include <chrono>
#include <ctime>
#include <thread>
#include "errno.h"

#define FROM_INPUT_STRING false

Expand Down Expand Up @@ -61,25 +60,11 @@ uint32_t fileSize(string fn) {
return fileSize;
}

void checkError()
{
if(errno == ENOENT)
{
cout<< "VAsim Error: input file could not be found"<<endl;
exit(-1);
}
}

vector<unsigned char> file2CharVector(string fn) {

// open the file:
std::ifstream file(fn, ios::binary);

if(file.fail())
{
checkError();
}

// get its size:
std::streampos fileSize;

Expand Down

0 comments on commit 2280fcb

Please sign in to comment.