views:

23

answers:

1

Is there a way to make a class generated by jaxb-xjc Throwable? I haven't found a way to do it in the binding file. If a schema defines an "Exception" type is there some other way to use it as such?

Google results seem to be drowned in other Exceptions and Throwables.

+1  A: 

Clarification: Are you looking for a way to make a class generated by XJC extend Throwable?

If so I'm not aware of a standard means to do this, or of an existing XJC extension. The good news is that XJC is pluggable enough to create your own extension to do just this. Details can be found at the link below:

Blaise Doughan
@Blaise That is what I'm looking to do. I guess I'm surprised that a schema can't represent an Exception and that each implementation then can convert into it's respective languages error handling. Thanks for pointing me to the plugins though!
Adam