diff --git a/test/test.cpp b/test/test.cpp
index fd0cd752d861dc8de0a8cbb5f0fa323d9d820028..572bb2f26ff597d033766987dc63ef084eba61a3 100644
--- a/test/test.cpp
+++ b/test/test.cpp
@@ -60,11 +60,24 @@ int main(int argc, char* argv[])
 		usage(argc,argv);
 	}
 
-	auto ehp = EHFrameParser_t::factory(argv[1]);
-	ehp->print();
+	try
+	{
+		auto ehp = EHFrameParser_t::factory(argv[1]);
+		ehp->print();
 
 
-	print_lps(ehp.get());
+		print_lps(ehp.get());
+	}
+	catch(const exception& e )
+	{
+		cout <<" libehp threw an exception, this may or may not be an error depending on the input file" << endl;
+		cout << e.what() << endl;
+	}
+	catch(...)
+	{
+		cout <<" ehp threw an exception of an unknonwn type -- this shouldn't happen " << endl;
+		abort();
+	};
 
 	return 0;
 }