1b61a96e7ef1a78acf013bbf08fe537e5b5f129caPeter Hallampackage org.bouncycastle.jce.provider; 2b61a96e7ef1a78acf013bbf08fe537e5b5f129caPeter Hallam 3c37f4a04ef89e73a39a59f3c5a179af8c8ab5974Brian Carlstromimport org.bouncycastle.jce.exception.ExtException; 4c37f4a04ef89e73a39a59f3c5a179af8c8ab5974Brian Carlstrom 5c37f4a04ef89e73a39a59f3c5a179af8c8ab5974Brian Carlstrompublic class AnnotatedException 6b61a96e7ef1a78acf013bbf08fe537e5b5f129caPeter Hallam extends Exception 7c37f4a04ef89e73a39a59f3c5a179af8c8ab5974Brian Carlstrom implements ExtException 8b61a96e7ef1a78acf013bbf08fe537e5b5f129caPeter Hallam{ 9c37f4a04ef89e73a39a59f3c5a179af8c8ab5974Brian Carlstrom private Throwable _underlyingException; 10b61a96e7ef1a78acf013bbf08fe537e5b5f129caPeter Hallam 11028ab6e01e3b911024b9b9243e9a0f4ac377c0faSergio Giro public AnnotatedException(String string, Throwable e) 12b61a96e7ef1a78acf013bbf08fe537e5b5f129caPeter Hallam { 13b61a96e7ef1a78acf013bbf08fe537e5b5f129caPeter Hallam super(string); 14c37f4a04ef89e73a39a59f3c5a179af8c8ab5974Brian Carlstrom 15b61a96e7ef1a78acf013bbf08fe537e5b5f129caPeter Hallam _underlyingException = e; 16b61a96e7ef1a78acf013bbf08fe537e5b5f129caPeter Hallam } 17c37f4a04ef89e73a39a59f3c5a179af8c8ab5974Brian Carlstrom 18028ab6e01e3b911024b9b9243e9a0f4ac377c0faSergio Giro public AnnotatedException(String string) 19b61a96e7ef1a78acf013bbf08fe537e5b5f129caPeter Hallam { 20b61a96e7ef1a78acf013bbf08fe537e5b5f129caPeter Hallam this(string, null); 21b61a96e7ef1a78acf013bbf08fe537e5b5f129caPeter Hallam } 22b61a96e7ef1a78acf013bbf08fe537e5b5f129caPeter Hallam 23c37f4a04ef89e73a39a59f3c5a179af8c8ab5974Brian Carlstrom Throwable getUnderlyingException() 24b61a96e7ef1a78acf013bbf08fe537e5b5f129caPeter Hallam { 25b61a96e7ef1a78acf013bbf08fe537e5b5f129caPeter Hallam return _underlyingException; 26b61a96e7ef1a78acf013bbf08fe537e5b5f129caPeter Hallam } 27c37f4a04ef89e73a39a59f3c5a179af8c8ab5974Brian Carlstrom 28b61a96e7ef1a78acf013bbf08fe537e5b5f129caPeter Hallam public Throwable getCause() 29b61a96e7ef1a78acf013bbf08fe537e5b5f129caPeter Hallam { 30b61a96e7ef1a78acf013bbf08fe537e5b5f129caPeter Hallam return _underlyingException; 31b61a96e7ef1a78acf013bbf08fe537e5b5f129caPeter Hallam } 32b61a96e7ef1a78acf013bbf08fe537e5b5f129caPeter Hallam} 33