Cyber Monday 2024! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Eccouncil Exam 312-96 Topic 1 Question 14 Discussion

Actual exam question for Eccouncil's 312-96 exam
Question #: 14
Topic #: 1
[All 312-96 Questions]

Which of the following method will you use in place of ex.printStackTrace() method to avoid printing stack trace on error?

Show Suggested Answer Hide Answer
Suggested Answer: C

Contribute your Thoughts:

Myong
5 months ago
That's true, but sometimes you just want the error message without the full stack trace, so ex.getMessage() could be the better option
upvoted 0 times
...
Yolande
6 months ago
I personally prefer using ex.printStackTrace() because it provides detailed stack trace for debugging
upvoted 0 times
...
Vashti
6 months ago
But ex.LogError() is not a standard method, while ex.getMessage() is commonly used to get error message
upvoted 0 times
...
Myong
7 months ago
I disagree, I believe the correct method is ex.LogError()
upvoted 0 times
...
Vashti
7 months ago
I think the answer is C) ex.getMessage()
upvoted 0 times
...
Helaine
8 months ago
Good to know, thanks for confirming!
upvoted 0 times
...
Rex
8 months ago
That's correct! ex.getMessage() will only print the error message instead of the full stack trace.
upvoted 0 times
...
Helaine
8 months ago
C) ex.getMessage();
upvoted 0 times
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77