net.sf.oval.exception
Class ExceptionTranslatorJDKExceptionsImpl
java.lang.Object
net.sf.oval.exception.ExceptionTranslatorJDKExceptionsImpl
- All Implemented Interfaces:
- ExceptionTranslator
public class ExceptionTranslatorJDKExceptionsImpl
- extends Object
- implements ExceptionTranslator
Translates OVal specific exceptions to standard exceptions part of the JRE:
ConstraintsViolatedException
for constructor/method parameter translated to IllegalArgumentException
ConstraintsViolatedException
for class field translated to IllegalStateException
ConstraintsViolatedException
for method return values translated to IllegalStateException
- Other exceptions based on
OValException
translated to RuntimeException
- Author:
- Sebastian Thomschke
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExceptionTranslatorJDKExceptionsImpl
public ExceptionTranslatorJDKExceptionsImpl()
translateException
public RuntimeException translateException(OValException ex)
- If this method returns null, the original exception is thrown.
- Specified by:
translateException
in interface ExceptionTranslator
- Returns:
- the exception to throw
Copyright © 2005-2013 The OVal Development Team. All Rights Reserved.