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

This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation
better.




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

[2006-05-23 22:03:22] [EMAIL PROTECTED]

Reclassified as documentation problem.

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

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

[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