change return type of parsing methods

-change return type of parsing methods to void
-print the trace for exceptions in JUnit test cases