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 @@ -50,11 +50,11 @@ public class GetResource extends BasicFunction {
50
50
},
51
51
new FunctionReturnSequenceType (Type .BASE64_BINARY , Cardinality .ZERO_OR_ONE ,
52
52
"<status result=\" ok\" /> if deployment was ok. Throws an error otherwise." ));
53
-
53
+
54
54
public GetResource (XQueryContext context ) {
55
55
super (context , signature );
56
56
}
57
-
57
+
58
58
@ Override
59
59
public Sequence eval (Sequence [] args , Sequence contextSequence )
60
60
throws XPathException {
@@ -71,8 +71,8 @@ public Sequence eval(Sequence[] args, Sequence contextSequence)
71
71
// FileSystemResolver already returns an input stream
72
72
StreamSource source = (StreamSource ) pkg .getResolver ().resolveResource (path );
73
73
return Base64BinaryDocument .getInstance (context , source .getInputStream ());
74
- } catch (Storage .NotExistException ex ) {
75
- // nothing
74
+ } catch (Storage .NotExistException e ) {
75
+ throw new XPathException ( ErrorCodes . FODC0002 , "Resource " + path + " does not exist." , e );
76
76
}
77
77
}
78
78
}
You can’t perform that action at this time.
0 commit comments