BlackFriday 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
5 months ago
I personally prefer using ex.printStackTrace() because it provides detailed stack trace for debugging
upvoted 0 times
...
Vashti
5 months ago
But ex.LogError() is not a standard method, while ex.getMessage() is commonly used to get error message
upvoted 0 times
...
Myong
6 months ago
I disagree, I believe the correct method is ex.LogError()
upvoted 0 times
...
Vashti
6 months ago
I think the answer is C) ex.getMessage()
upvoted 0 times
...
Helaine
7 months ago
Good to know, thanks for confirming!
upvoted 0 times
...
Rex
7 months ago
That's correct! ex.getMessage() will only print the error message instead of the full stack trace.
upvoted 0 times
...
Helaine
7 months ago
C) ex.getMessage();
upvoted 0 times
...

Save Cancel