sinanselimoglu / geocoder-java

Automatically exported from code.google.com/p/geocoder-java
1 stars 0 forks source link

Don't print the message stack-trace, instead throw it. #38

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Call geocoder.geocode(geocoderRequest) with invalid request.
2.
3.

What is the expected output? What do you see instead?
I see exception stack trace and null is returned. I want to have the exception 
thrown at me.

What version of the product are you using? On what operating system?
latest - 0.15

Please provide any additional information below.

Geocoder.class line 60:

        } catch (Exception e) {
            logger.error(e.getMessage(), e);
            return null;
        }

Why are you printing the stacktrace??? You are a library - you should throw the 
exception and let the users that use the library decide what to do with it!!! 
Now I have a test-case that tests with an invalid parameter and every time I 
run it I see a huuge stacktrace in the command line (instead of specifying an 
expected parameter on the test).

Original issue reported on code.google.com by pe...@tahchiev.net on 3 Feb 2014 at 11:23

GoogleCodeExporter commented 9 years ago

Original comment by panchmp on 30 Apr 2014 at 10:29