Skip to content

Commit eeffe25

Browse files
committed
nfs4: add DelegRevokedException
add missing exception Acked-by: Marina Sahakyan Target: master
1 parent 48d80f5 commit eeffe25

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

core/src/main/java/org/dcache/nfs/nfsstat.java

+2
Original file line numberDiff line numberDiff line change
@@ -613,6 +613,8 @@ public static void throwIfNeeded(int errorCode) throws ChimeraNFSException {
613613
throw new XattrTooBigException();
614614
case nfsstat.NFS4ERR_OFFLOAD_DENIED:
615615
throw new OffloadDeniedExeption();
616+
case nfsstat.NFS4ERR_DELEG_REVOKED:
617+
throw new DelegRevokedException();
616618
default:
617619
throw new BadXdrException();
618620
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/*
2+
* Copyright (c) 2025 Deutsches Elektronen-Synchroton,
3+
* Member of the Helmholtz Association, (DESY), HAMBURG, GERMANY
4+
*
5+
* This library is free software; you can redistribute it and/or modify
6+
* it under the terms of the GNU Library General Public License as
7+
* published by the Free Software Foundation; either version 2 of the
8+
* License, or (at your option) any later version.
9+
*
10+
* This library is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU Library General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU Library General Public
16+
* License along with this program (see the file COPYING.LIB for more
17+
* details); if not, write to the Free Software Foundation, Inc.,
18+
* 675 Mass Ave, Cambridge, MA 02139, USA.
19+
*/
20+
package org.dcache.nfs.status;
21+
22+
import static org.dcache.nfs.nfsstat.NFS4ERR_DELEG_REVOKED;
23+
import org.dcache.nfs.ChimeraNFSException;
24+
25+
public class DelegRevokedException extends ChimeraNFSException {
26+
27+
private static final long serialVersionUID = 2223868610132732861L;
28+
29+
public DelegRevokedException() {
30+
super(NFS4ERR_DELEG_REVOKED);
31+
}
32+
33+
public DelegRevokedException(String msg) {
34+
super(NFS4ERR_DELEG_REVOKED, msg);
35+
}
36+
37+
public DelegRevokedException(String msg, Throwable cause) {
38+
super(NFS4ERR_DELEG_REVOKED, msg, cause);
39+
}
40+
}

0 commit comments

Comments
 (0)