Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Eccouncil 312-96 Exam - Topic 7 Question 55 Discussion

Which of the following method will you use in place of ex.printStackTrace() method to avoid printing stack trace on error?
C) ex.getMessage();
A) ex.StackTrace.getError();
B) ex.message();
D) ex.getError();

Eccouncil 312-96 Exam - Topic 7 Question 55 Discussion

Actual exam question for Eccouncil's 312-96 exam
Question #: 55
Topic #: 7
[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:

0/2000 characters
Ettie
4 days ago
Totally agree, that's the standard way to handle it!
upvoted 0 times
...
Ettie
9 days ago
C) ex.getMessage() is the right choice.
upvoted 0 times
...
Tegan
14 days ago
D) ex.getError() sounds wrong to me.
upvoted 0 times
...
Michel
19 days ago
I thought ex.printStackTrace() was the only way to debug!
upvoted 0 times
...
Willard
24 days ago
Wait, is ex.message() even a real method?
upvoted 0 times
...
Alfreda
29 days ago
Totally agree with Jaclyn!
upvoted 0 times
...
Jaclyn
1 month ago
C) ex.getMessage() is the right choice!
upvoted 0 times
...
Fatima
1 month ago
I vaguely recall that ex.printStackTrace() is used for debugging, so we definitely want to avoid that. C seems like the best choice, but I hope I'm right!
upvoted 0 times
...
Elliot
1 month ago
I'm a bit confused about the options, but I don't think A or D are valid methods. I might go with C as well.
upvoted 0 times
...
Genevieve
2 months ago
I feel like we practiced a similar question in class, and I think the right answer is C) ex.getMessage().
upvoted 0 times
...
Merrilee
3 months ago
I think I remember that using ex.getMessage() is a way to get the error message without the stack trace, but I'm not completely sure.
upvoted 0 times
...

Save Cancel