Code example for SQLException

Methods: getMessage

0
                     throw new SQLException("Insertion failed");
                 }else{ 
                     resultIntent.putExtra("name", name);
                 } 
            } catch (SQLException e) {
                Log.e("EMOCHA" , getClass().getSimpleName() +" :: Error ::" + e.getMessage() );
            } finally { 
                setResult(RESULT_OK, resultIntent);
                 
                finish();
            } 
        } 
    } 
     
    private void cancel(){ 
        setResult(RESULT_CANCELED, getIntent());
        finish();
    } 
     
    private boolean validateInputFields(){ 
        String name = nameField.getText().toString();