public int doErrorReturn ( int iChangeType , int iErrorCode ) // init this field override for other value { if ( iChangeType == DBConstants . AFTER_UPDATE_TYPE ) if ( this . isModLockMode ( ) ) { if ( this . getOwner ( ) . getTable ( ) . getCurrentTable ( ) == this . getOwner ( ) . getTable ( ) ) { // Must be the top-level record to do the merge. Otherwise, return an error and let the current record handle the merge boolean bRunMergeCode = false ; if ( ( this . getOwner ( ) . getMasterSlave ( ) & RecordOwner . MASTER ) != 0 ) if ( ( this . getOwner ( ) . getDatabaseType ( ) & DBConstants . SERVER_REWRITES ) == 0 ) bRunMergeCode = true ; // Typically refresh in the client so listeners can be run if ( ( this . getOwner ( ) . getMasterSlave ( ) & RecordOwner . SLAVE ) != 0 ) if ( ( this . getOwner ( ) . getDatabaseType ( ) & DBConstants . SERVER_REWRITES ) != 0 ) bRunMergeCode = true ; // Unless server rewrite is set, then do the rewrite in the server if ( bRunMergeCode ) return this . refreshMergeAndRewrite ( iErrorCode ) ; // Only do this in the master and shared code } } return super . doErrorReturn ( iChangeType , iErrorCode ) ; }
Called when a error happens on a file operation return the error code or fix the problem .