ID:               37566
 Updated by:       [EMAIL PROTECTED]
 Reported By:      kotsutsumi at xenophy dot com
-Status:           Open
+Status:           Analyzed
-Bug Type:         *General Issues
+Bug Type:         Documentation problem
-Operating System: FedoraCore5
+Operating System: *
-PHP Version:      5.1.4
+PHP Version:      *
 New Comment:

Reclassified as documentation problem.

session_write_close() (write and close) is called during 
the script shutdown and can't therefor throw exceptions.


Previous Comments:
------------------------------------------------------------------------

[2006-05-23 21:49:05] kotsutsumi at xenophy dot com

Description:
------------
It mounts in the class. 

       session_set_save_handler(
           array($this, '_open'),
           array($this, '_close'),
           array($this, '_read'),
           array($this, '_write'),
           array($this, '_destroy'),
           array($this, '_clean')
       );

...

public function _write( $strID, &$objData ) {

   // some process.
   throw new Exception;
}

Result:
Exception thrown without a stack frame in ....

Why?
The exception is normally generated in other methods. 
ex. _read,_destroy,_clear... 

Reproduce code:
---------------
    public function _write( $strID, &$objData ) {

        try {
            $strSQL = "REPLACE INTOd sessions hogeVALUES ( ?, ?, ? 
)";

            $putData = $this->objResource->prepare( $strSQL );
            $putData->bindParam( 1, $strID );
            $putData->bindParam( 2, time() );
            $putData->bindParam( 3, $objData );
            $putData->execute();
            return true;
        } catch( PDOException $e) {
            $strError = sprintf(
"ƒZƒbƒVƒ‡ƒ“ƒf[ƒ^‚̐ݒè‚ÉŽ¸”s‚µ‚Ü‚µ‚½B<br><br>%s" ,$e->getMessage()
);
            throw new Exception( $strError );
        }
   }

Expected result:
----------------
Fatal error: Exception thrown without a stack frame in Unknown on line
0



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=37566&edit=1

Reply via email to