• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

What is causal Exception?

 
Ranch Hand
Posts: 635
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
May someone describe causal Exception and how deal with it?
 
Marshal
Posts: 28177
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you provide the context where you read this rather incomprehensible expression?
 
Ranch Hand
Posts: 492
Firefox Browser VI Editor Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
causal implies cause, but I'm not sure if you mean what is causing the exception? or asking if the exception causes something to happen?

Hunter
 
Paul Clapham
Marshal
Posts: 28177
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I googled for the phrase and found a few examples, mostly from people who didn't appear to be native English speakers. That's why I asked for the context, because although "causal" is an English word, you wouldn't normally describe a Java exception as "causal" in English.
 
Master Rancher
Posts: 4796
72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I was thinking it might possibly a reference to the exception (Throwable) that can be returned by getCause(). But it's probably better to wait for the original poster to tell us where he heard the term. Otherwise we could run off on irrelevant tangents.
 
Sheriff
Posts: 3063
12
Mac IntelliJ IDE Python VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
+1 with Mike. What else could it possibly mean? It's more common to call it a nested exception, but you do see it in stack traces under "Caused by:".

As far as how to deal with it, it would be rare to look into the "causal" exception except as a post mortem. That is, you look into the logs to figure out why something failed. Before we had nested exceptions, an exception handler that caught an exception, maybe logged something cryptic, and then threw its own exception would completely obscure the underlying cause.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
At first I saw "casual" and figured it was an exception without a tie.

Seriously, especially in the web world, it's common to wrap an exception as the cause of a higher level exception such as ServletException or JspException for throwing higher in the chain. The original exception can be thought of as the "causal exception" although that's not a term that's often bandied about.
 
abalfazl hossein
Ranch Hand
Posts: 635
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This the resource of causal Exception

http://books.google.com/books?id=fu5HtixRje8C&pg=PA112&lpg=PA112&dq=throw+new+Exception(+"Here's+the+story...",+causalException+);&source=bl&ots=nHUC1v4tvv&sig=A0K7scRGG2mL4HMbsElzOu67ues&hl=en&ei=uQZdTOKAN4_80wTLqPDABw&sa=X&oi=book_result&ct=result&resnum=1&ved=0CBIQ6AEwAA#v=onepage&q=throw%20new%20Exception(%20%22Here's%20the%20story...%22%2C%20causalException%20)%3B&f=false

and about English language and native language and so on...:

This is the resume of one of the writers:

http://pat.net/resume/

As friends see, The language of Pat Niemeyer is English.

But this is not English class,

May someone give me a simple example of causal Exception please? I need more information.

Thanks in advance .
 
Marshal
Posts: 79151
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You already have an example in the book page you quoted.

Please explain what you don't understand.
reply
    Bookmark Topic Watch Topic
  • New Topic