Skip to content

Commit

Permalink
Add wrapper exception class for ERR_BSAFE_NON_EXISTENT
Browse files Browse the repository at this point in the history
  • Loading branch information
jesse-gallagher committed Mar 11, 2024
1 parent 06bbd04 commit 822c2e1
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
* ==========================================================================
* Copyright (C) 2019-2022 HCL America, Inc. ( http://www.hcl.com/ )
* All rights reserved.
* ==========================================================================
* Licensed under the Apache License, Version 2.0 (the "License"). You may
* not use this file except in compliance with the License. You may obtain a
* copy of the License at <http://www.apache.org/licenses/LICENSE-2.0>.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
* ==========================================================================
*/
package com.hcl.domino.exception;

import com.hcl.domino.DominoException;

/**
* Represents error code 0x172f, "The requested item does not exist"
*
* @author Jesse Gallagher
* @since 1.37.0
*/
public class SecurityItemDoesNotExistException extends DominoException {
private static final long serialVersionUID = 1L;

public SecurityItemDoesNotExistException(final int id, final String message) {
super(id, message);
}

public SecurityItemDoesNotExistException(final int id, final String message, final Throwable cause) {
super(id, message, cause);
}

public SecurityItemDoesNotExistException(final String msg) {
super(msg);
}

public SecurityItemDoesNotExistException(final String msg, final Throwable cause) {
super(msg, cause);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
import com.hcl.domino.exception.NoCrossCertificateException;
import com.hcl.domino.exception.NotAuthorizedException;
import com.hcl.domino.exception.QuitPendingException;
import com.hcl.domino.exception.SecurityItemDoesNotExistException;
import com.hcl.domino.exception.ServerNotFoundException;
import com.hcl.domino.exception.ServerRestrictedException;
import com.hcl.domino.exception.ServerUnavailableException;
Expand Down Expand Up @@ -321,6 +322,8 @@ public static Optional<DominoException> toNotesError(final short result, final S
return Optional.of(new NoCrossCertificateException(s, message));
case INsfErr.ERR_INVALID_NAME:
return Optional.of(new InvalidRemotePathnameException(s, message));
case IBsafeErr.ERR_BSAFE_NON_EXISTENT:
return Optional.of(new SecurityItemDoesNotExistException(s, message));
default:
return Optional.of(new DominoException(s, message));
}
Expand Down

0 comments on commit 822c2e1

Please sign in to comment.