File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
extensions/modules/expathrepo/src/main/java/org/exist/xquery/modules/expathrepo Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -51,11 +51,11 @@ public class GetResource extends BasicFunction {
51
51
},
52
52
new FunctionReturnSequenceType (Type .BASE64_BINARY , Cardinality .ZERO_OR_ONE ,
53
53
"<status result=\" ok\" /> if deployment was ok. Throws an error otherwise." ));
54
-
54
+
55
55
public GetResource (XQueryContext context ) {
56
56
super (context , signature );
57
57
}
58
-
58
+
59
59
@ Override
60
60
public Sequence eval (Sequence [] args , Sequence contextSequence )
61
61
throws XPathException {
@@ -72,8 +72,8 @@ public Sequence eval(Sequence[] args, Sequence contextSequence)
72
72
// FileSystemResolver already returns an input stream
73
73
StreamSource source = (StreamSource ) pkg .getResolver ().resolveResource (path );
74
74
return Base64BinaryDocument .getInstance (context , source .getInputStream ());
75
- } catch (Storage .NotExistException ex ) {
76
- // nothing
75
+ } catch (Storage .NotExistException e ) {
76
+ throw new XPathException ( ErrorCodes . FODC0002 , "Resource " + path + " does not exist." , e );
77
77
}
78
78
}
79
79
}
You can’t perform that action at this time.
0 commit comments