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 Exam 312-96 Topic 10 Question 33 Discussion

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

Merlyn
2 months ago
Haha, B) ex.message(); sounds like something a newbie would try. C) is the clear winner here.
upvoted 0 times
Tegan
29 days ago
C) ex.getMessage(); is the way to go to handle errors properly.
upvoted 0 times
...
Rikki
29 days ago
I always use C) ex.getMessage(); to avoid printing the stack trace.
upvoted 0 times
...
Kristeen
1 months ago
Definitely, C) ex.getMessage(); is the correct method to use.
upvoted 0 times
...
Corrinne
2 months ago
I agree, B) ex.message(); does sound like a newbie mistake.
upvoted 0 times
...
...
Sharika
2 months ago
D) ex.getError(); sounds like it might work, but C) is the standard way to get the error message.
upvoted 0 times
...
Linette
3 months ago
I agree, C) ex.getMessage(); is the most straightforward option. No need for the noisy stack trace.
upvoted 0 times
Mari
1 months ago
I agree, ex.getMessage(); is much cleaner than printing the whole stack trace.
upvoted 0 times
...
Sheridan
1 months ago
Yeah, C) ex.getMessage(); is the way to go. Keeps it clean.
upvoted 0 times
...
Judy
2 months ago
I always use C) ex.getMessage(); to avoid the stack trace.
upvoted 0 times
...
...
Micah
3 months ago
C) ex.getMessage(); is the way to go. It provides the error message without the stack trace.
upvoted 0 times
Arletta
2 months ago
ex.StackTrace.getError() would just clutter the output with unnecessary information.
upvoted 0 times
...
Carol
2 months ago
I agree, using ex.getMessage() is much cleaner and easier to read.
upvoted 0 times
...
Alex
2 months ago
C) ex.getMessage(); is the way to go. It provides the error message without the stack trace.
upvoted 0 times
...
...
Laila
3 months ago
I'm not sure, but I think D) ex.getError() might also work
upvoted 0 times
...
Annette
3 months ago
I agree with Mendy, using ex.getMessage() will avoid printing the stack trace
upvoted 0 times
...
Mendy
4 months ago
I think the answer is C) ex.getMessage()
upvoted 0 times
...

Save Cancel