Factorial is ".$result; } } catch(Exception $e) { echo '
Caught exception: ', $e->getMessage(); } try{ $result = RNCPHP\ROQL::queryObject("SELECT Contact From Contact"); }catch(Exception $e) { echo '
Caught exception: ', $e->getMessage(); } $result2 = RNCPHP\ROQL::queryObject("SELECT Contact From Contact"); // NOK {{ROQL must be placed inside a try-catch block.}} } $x = 4; $y; calcFactorial($x); // Will not throw error as $x has a valid value assigned. calcFactorial($y); // Will throw error as $y has no value assigned. ?>