| 1 | package fr.sii.ogham.core.exception.resource; | |
| 2 | ||
| 3 | import static fr.sii.ogham.core.CoreConstants.SERIAL_VERSION_UID; | |
| 4 | ||
| 5 | import fr.sii.ogham.core.exception.MessagingException; | |
| 6 | import fr.sii.ogham.core.resource.Resource; | |
| 7 | import fr.sii.ogham.core.resource.path.ResourcePath; | |
| 8 | import fr.sii.ogham.core.resource.resolver.ResourceResolver; | |
| 9 | ||
| 10 | /** | |
| 11 | * Ogham uses {@link ResourceResolver} to resolve a {@link Resource} from a | |
| 12 | * {@link ResourcePath}. | |
| 13 | * | |
| 14 | * Resource resolution may fail either due to an invalid path or because no | |
| 15 | * resolver is able to handle the {@link ResourcePath}. | |
| 16 | * | |
| 17 | * @author Aurélien Baudet | |
| 18 | * | |
| 19 | * @see NoResolverException | |
| 20 | */ | |
| 21 | public class ResourceResolutionException extends MessagingException { | |
| 22 | private static final long serialVersionUID = SERIAL_VERSION_UID; | |
| 23 | ||
| 24 | private final transient ResourcePath path; | |
| 25 | ||
| 26 | public ResourceResolutionException(String message, ResourcePath path, Throwable cause) { | |
| 27 | super(message, cause); | |
| 28 | this.path = path; | |
| 29 | } | |
| 30 | ||
| 31 | public ResourceResolutionException(String message, ResourcePath path) { | |
| 32 | super(message); | |
| 33 | this.path = path; | |
| 34 | } | |
| 35 | ||
| 36 | public ResourceResolutionException(ResourcePath path, Throwable cause) { | |
| 37 | super(cause); | |
| 38 | this.path = path; | |
| 39 | } | |
| 40 | ||
| 41 | public ResourcePath getPath() { | |
| 42 |
1
1. getPath : replaced return value with null for fr/sii/ogham/core/exception/resource/ResourceResolutionException::getPath → NO_COVERAGE |
return path; |
| 43 | } | |
| 44 | } | |
Mutations | ||
| 42 |
1.1 |