private boolean isApplicationError ( Throwable rootEx , String pkgRoot ) { if ( rootEx != null ) { StackTraceElement [ ] stackTrace = rootEx . getStackTrace ( ) ; if ( stackTrace != null && stackTrace . length > 0 ) { StackTraceElement rootThrower = stackTrace [ 0 ] ; String className = rootThrower . getClassName ( ) ; if ( className != null && ! ! ! className . startsWith ( pkgRoot ) ) { return true ; } } } return false ; }
This method determines if the error is initiated by an application or not .