public final T send ( ) throws BoxException { Exception ex = null ; T result = null ; try { result = onSend ( ) ; } catch ( Exception e ) { ex = e ; } // We catch the exception so that onSendCompleted can be called in case additional actions need to be taken onSendCompleted ( new BoxResponse ( result , ex , this ) ) ; if ( ex != null ) { if ( ex instanceof BoxException ) { throw ( BoxException ) ex ; } else { throw new BoxException ( "unexpected exception " , ex ) ; } } return result ; }
Synchronously make the request to Box and handle the response appropriately .