01: /*******************************************************************************
02: * Portions created by Sebastian Thomschke are copyright (c) 2005-2007 Sebastian
03: * Thomschke.
04: *
05: * All Rights Reserved. This program and the accompanying materials
06: * are made available under the terms of the Eclipse Public License v1.0
07: * which accompanies this distribution, and is available at
08: * http://www.eclipse.org/legal/epl-v10.html
09: *
10: * Contributors:
11: * Sebastian Thomschke - initial implementation.
12: *******************************************************************************/package net.sf.oval.exception;
13:
14: /**
15: * An exception translater for all exception thrown by the guard
16: * during runtime when performing constraint validations on guarded objects.
17: *
18: * @author Sebastian Thomschke
19: */
20: public interface ExceptionTranslator {
21: /**
22: * If this method returns null, the original exception is thrown.
23: *
24: * @param ex
25: * @return the exception to throw
26: */
27: RuntimeException translateException(OValException ex);
28: }
|