SarkariResultess QA Bank

PHP exception handling का basic syntax क्या है? के सही और गलत approach में क्या फर्क है?

Other 0 Views Verified
PHP exception handling का basic syntax क्या है? के सही और गलत approach में क्या फर्क है? सही विकल्प चुनें और code/solution को समझें।
Sarkari Result QA Bank
Editorially reviewed exam information

Answer & Explanation

4 Answers
Verified Correct Answer

try { risky(); } catch (Throwable $e) { log_error($e); }

try { risky(); } catch (Throwable $e) { log_error($e); }
Additional Explanation
try/catch exceptions और Throwable errors handle कर सकता है।
Verified

catch around try only

catch around try only
Additional Explanation
यह विकल्प सही Core PHP solution नहीं है।
Verified

try risky() except $e

try risky() except $e
Additional Explanation
यह विकल्प सही Core PHP solution नहीं है।
Verified

handle risky with error()

handle risky with error()
Additional Explanation
यह विकल्प सही Core PHP solution नहीं है।