Comunitatea PHP Romania
 

 
java_last_exception_get

java_last_exception_get

(PHP 4 >= 4.0.2)

java_last_exception_get -- Get last Java exception

Description

exception java_last_exception_get ( void )

Avertisment

Această funcție este EXPERIMENTALĂ. Comportamentul acestei funcții, numele funcției, și orice altceva documentat despre această funcție ar putea fi schimbate fară un anunț prealabil, intr-o viitoare versiune PHP. V-am avertizat, deci folosiți această extensie pe riscul dv.

The following example demonstrates the usage of Java's exception handler from within PHP:

Exemplu 1. Java exception handler

<?php
  $stack
= new Java('java.util.Stack');
  
$stack->push(1);

  
// This should succeed
  
$result = $stack->pop();
  
$ex = java_last_exception_get();
  if (!
$ex) print "$result\n";

  
// This should fail (error suppressed by @)
  
$result = @$stack->pop();
  
$ex = java_last_exception_get();
  if (
$ex) print $ex->toString();

  
// Clear last exception
  
java_last_exception_clear();
?>

Ultimele discutii in forum RSS Forum

Ultimele articole Ultimele articole

Top membri

Pirahna Pirahna
acasa , in pat
carco carco
Bucuresti
Birkoff Birkoff
Bucuresti
Mascka Mascka
Braila
raul_ raul_
whooper whooper
Toronto ON
mihaitha mihaitha
Sibiu
gabysolomon gabysolomon
Bacau
oriceon oriceon
Constanta
garlicinicolae garlicinicolae

Newsletter


Email:
 inscriere
 renuntare
 
 Arhiva newsletter

Parteneriat

Copyright © 2001-2008 PHP Romania Add PHPRomania to Google Add PHPRomania to Del.icio.us Add PHPRomania to Stumbleupon Add PHPRomania to Yahoo! Add PHPRomania to Digg Add PHPRomania to Blink Problem Mortgage | Mortgage Calculator | Libros | Homeowner Loan | Pay Day Loans
Ads: Partener Way2Web Nework: gazduire web | inregistrare domenii | web design | imobiliare | web hosting
Powered by Simplis