void checkSetupDone ( String operation ) { if ( ! setupSuccessful ( ) ) { String stateToString = setupStateToString ( setupState ) ; Logger . e ( "Illegal state for operation (" , operation , "): " , stateToString ) ; throw new IllegalStateException ( stateToString + " Can't perform operation: " + operation ) ; } }
Checks that setup was done ; if not throws an exception .