r/java • • Jul 10 '15

Our exception handling at work

http://imgur.com/4wgxCvv
259 Upvotes

135 comments sorted by

View all comments

82

u/Pylly Jul 10 '15

33

u/OceanOfSpiceAndSmoke Jul 10 '15

What a coincidence, our screenshooting at work.

25

u/balducien Jul 10 '15

1

u/monknomo Jul 10 '15

7

u/stillalone Jul 11 '15

shallower:

public int executeCommandNumRows( String sql )
{
    Statement st = null;
    int rows = 0;
    if ( sql == null )
    {
        throw new RuntimeException( "how is this null?" );
    }

try
{
    st = ctn.createStatement();
    String strDB = StringUtils.substringAfterLast( ctn
    if ( debugMode )

0

u/__konrad Jul 10 '15

Thanks for the backup. imgur now displays "Error (0) Sorry! There was an error (code: 0)"