View Single Post
Old 02-27-2008, 10:56 PM   #4 (permalink)
abiko
The Contributor
 
abiko's Avatar
 
Join Date: Feb 2008
Location: Croatia
Posts: 90
Thanks: 4
abiko is on a distinguished road
Default

Yes.
Let's say you have a multilingual site.
PHP Code:
<?php
    
    
function test$t ) {
        global 
$lang;
        if ( !
is_numeric$t) ) {
            throw new 
Exception ($lang->NUMERIC_ERROR);
        } else {
            echo 
$t;
        }
    }
    
    
    try {
    
test'a');
}

catch( 
Exception  $e ) {
       
// Some error managment
$tmpl->addVar'error'$e->getMessage() );
$tmpl->activate'errorLayout' );

}
?>
For example.
__________________
Back from sysadmins to the programmers.
Send a message via ICQ to abiko Send a message via MSN to abiko
abiko is offline  
Reply With Quote