Show
Ignore:
Timestamp:
10/02/08 01:00:33 (3 months ago)
Author:
nowelium
Message:

fix:procedure & transaction scripts

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/php/misc/Hermit/src/Hermit/tx/HermitRequiredTx.php

    r19344 r20417  
    55 */ 
    66class HermitRequiredTx extends AbstractHermitTx { 
     7    public function proceed(HermitProxy $proxy, $name, array $parameters){ 
     8        $began = false; 
     9 
     10        if(!$this->hasTransaction()){ 
     11            $this->begin(); 
     12            $began = true; 
     13        } 
     14        $ret = null; 
     15        try { 
     16            $ret = $proxy->request($name, $parameters); 
     17            if($began){ 
     18                $this->commit(); 
     19            } 
     20            return $ret; 
     21        } catch(Exception $e){ 
     22            if($began){ 
     23                $this->complete($e); 
     24            } 
     25            throw $e; 
     26        } 
     27    } 
    728}