private void processScript ( ) { ScriptReaderBase scr = null ; try { if ( database . isFilesInJar ( ) || fa . isStreamElement ( scriptFileName ) ) { scr = ScriptReaderBase . newScriptReader ( database , scriptFileName , scriptFormat ) ; Session session = database . sessionManager . getSysSessionForScript ( database ) ; scr . readAll ( session ) ; scr . close ( ) ; } } catch ( Throwable e ) { if ( scr != null ) { scr . close ( ) ; if ( cache != null ) { cache . close ( false ) ; } closeAllTextCaches ( false ) ; } database . logger . appLog . logContext ( e , null ) ; if ( e instanceof HsqlException ) { throw ( HsqlException ) e ; } else if ( e instanceof IOException ) { throw Error . error ( ErrorCode . FILE_IO_ERROR , e . toString ( ) ) ; } else if ( e instanceof OutOfMemoryError ) { throw Error . error ( ErrorCode . OUT_OF_MEMORY ) ; } else { throw Error . error ( ErrorCode . GENERAL_ERROR , e . toString ( ) ) ; } } }
Performs all the commands in the . script file .