lundi 14 mars 2016

Does PatternSyntaxException can have many causes?

What erroneous regexp could produce PatternSyntaxException that has many causes?

PatternSytanxException IS-A Throwable and has method .getCause(). While making application to print nice messages on SQLExceptions and PatternSyntaxExceptions I've found that some other exception SQLException can have many causes. In Java tutorial it is said that

A SQLException instance might have a causal relationship, which consists of one or more Throwable objects that caused the SQLException instance to be thrown. To navigate this chain of causes, recursively call the method SQLException.getCause until a null value is returned.

I'm wondering whether PatternSyntaxException anywhere is thrown so that chain of causes is specified?

Aucun commentaire:

Enregistrer un commentaire