1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.springmodules.validation.bean.conf;
18
19 import org.springframework.core.io.Resource;
20
21 /**
22 * Thrown when a {@link org.springmodules.validation.bean.conf.loader.xml.AbstractResourceBasedBeanValidationConfigurationLoader} implementation fails to load
23 * configurations from a resource.
24 *
25 * @author Uri Boness
26 */
27 public class ResourceConfigurationLoadingException extends RuntimeException {
28
29 private Resource resource;
30
31 public ResourceConfigurationLoadingException(Resource resource) {
32 super("Could not load configuration from resource '" + resource.getDescription() + "'");
33 this.resource = resource;
34 }
35
36 public ResourceConfigurationLoadingException(Resource resource, Throwable cause) {
37 super("Could not load configuration from resource '" + resource.getDescription() + "'", cause);
38 this.resource = resource;
39 }
40
41
42
43 public Resource getResource() {
44 return resource;
45 }
46
47 }