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 2 Question 25 Discussion

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

Denny
2 months ago
You know, I was gonna say ex.StackTrace.getError(), but then I realized that's not even a real thing. C) ex.getMessage() is where it's at.
upvoted 0 times
Vashti
1 months ago
Yeah, ex.StackTrace.getError() is a made-up method. C) ex.getMessage() is the correct one to use.
upvoted 0 times
...
Herminia
1 months ago
ex.getMessage() is definitely the way to go to avoid printing the stack trace.
upvoted 0 times
...
Dick
2 months ago
I agree, ex.StackTrace.getError() doesn't exist. C) ex.getMessage() is the correct method to use.
upvoted 0 times
...
...
Anastacia
2 months ago
Hah, ex.printStackTrace()? What is this, amateur hour? C) ex.getMessage() is the real deal, folks.
upvoted 0 times
Deangelo
1 months ago
ex.printStackTrace() is so outdated, C) ex.getMessage() is the modern choice.
upvoted 0 times
...
Meaghan
2 months ago
I agree, ex.getMessage() is much cleaner.
upvoted 0 times
...
Arminda
2 months ago
C) ex.getMessage() is the way to go.
upvoted 0 times
...
...
Robt
2 months ago
I'm not sure, but I think D) ex.getError() might also work
upvoted 0 times
...
Werner
2 months ago
I agree with Mammie, using ex.getMessage() will avoid printing the stack trace
upvoted 0 times
...
Mammie
3 months ago
I think the answer is C) ex.getMessage()
upvoted 0 times
...
Gladys
3 months ago
I'm gonna have to go with C) ex.getMessage(). It's the most straightforward way to get the error message without all the extra fluff.
upvoted 0 times
...
Joanne
3 months ago
C) ex.getMessage(); is the way to go! No need to clutter the output with that pesky stack trace.
upvoted 0 times
Cassi
2 months ago
ex.getMessage() is the best option to avoid cluttering the output.
upvoted 0 times
...
Terina
2 months ago
I always use ex.getMessage() to avoid printing the stack trace.
upvoted 0 times
...
Freida
2 months ago
ex.getMessage() is definitely the way to go, keeps things simple.
upvoted 0 times
...
William
2 months ago
I agree, ex.getMessage() is much cleaner than ex.printStackTrace().
upvoted 0 times
...
...

Save Cancel