forked from datacleaner/DataCleaner
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue datacleaner#370: Improved exception hierarchy+handling in valid…
…ation cases.
- Loading branch information
1 parent
04bf058
commit c3d147c
Showing
12 changed files
with
186 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
engine/core/src/main/java/org/datacleaner/job/ComponentValidationException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/** | ||
* DataCleaner (community edition) | ||
* Copyright (C) 2014 Neopost - Customer Information Management | ||
* | ||
* This copyrighted material is made available to anyone wishing to use, modify, | ||
* copy, or redistribute it subject to the terms and conditions of the GNU | ||
* Lesser General Public License, as published by the Free Software Foundation. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | ||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License | ||
* for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with this distribution; if not, write to: | ||
* Free Software Foundation, Inc. | ||
* 51 Franklin Street, Fifth Floor | ||
* Boston, MA 02110-1301 USA | ||
*/ | ||
package org.datacleaner.job; | ||
|
||
import org.datacleaner.api.Validate; | ||
import org.datacleaner.descriptors.ComponentDescriptor; | ||
|
||
/** | ||
* Exception thrown if validation (typically using {@link Validate} annotated | ||
* methods) of a component fails. | ||
*/ | ||
public class ComponentValidationException extends ComponentConfigurationException { | ||
|
||
private static final long serialVersionUID = 1L; | ||
|
||
private final ComponentDescriptor<?> _componentDescriptor; | ||
private final Object _componentInstance; | ||
|
||
public ComponentValidationException(ComponentDescriptor<?> componentDescriptor, Object componentInstance, | ||
Throwable cause) { | ||
super(cause.getMessage(), cause); | ||
_componentDescriptor = componentDescriptor; | ||
_componentInstance = componentInstance; | ||
} | ||
|
||
public ComponentDescriptor<?> getComponentDescriptor() { | ||
return _componentDescriptor; | ||
} | ||
|
||
public Object getComponentInstance() { | ||
return _componentInstance; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.