Java SQL Warning getCauseUsingWellKnownTypes(Throwable throwable)

Here you can find the source of getCauseUsingWellKnownTypes(Throwable throwable)

Description

get Cause Using Well Known Types

License

Apache License

Declaration

private static Throwable getCauseUsingWellKnownTypes(Throwable throwable) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.lang.reflect.InvocationTargetException;

import java.sql.SQLException;

public class Main {
    private static Throwable getCauseUsingWellKnownTypes(Throwable throwable) {
        if (throwable instanceof SQLException) {
            return ((SQLException) throwable).getNextException();
        } else if (throwable instanceof InvocationTargetException) {
            return ((InvocationTargetException) throwable).getTargetException();
        } else {/*from  w  w w . ja  va  2s .  com*/
            return null;
        }
    }
}

Related

  1. clearWarnings(Connection rawConnection)
  2. getCause(Throwable throwable)
  3. getCause(Throwable throwable)
  4. getCauseUsingWellKnownTypes(Throwable throwable)
  5. getExceptionCauseUsingWellKnownTypes(final Throwable exception)
  6. getFullStackTrace(Throwable t)
  7. getRootCause(Throwable throwable)