blob: 712ba4eef64c216260b8ca40496a3bee6519ca67 [file] [log] [blame]
Yuta HIGUCHI66ca1bf2014-03-12 18:34:09 -07001package net.onrc.onos.datastore;
2
3import net.onrc.onos.datastore.utils.ByteArrayUtil;
4
5/**
6 * Exception thrown when object was expected, but not found in data store.
7 */
8public class ObjectDoesntExistException extends RejectRulesException {
9 private static final long serialVersionUID = 859082748533417866L;
10
11 public ObjectDoesntExistException(final String message) {
12 super(message);
13 }
14
15 public ObjectDoesntExistException(final IKVTableID tableID,
16 final byte[] key, final Throwable cause) {
17 super(ByteArrayUtil.toHexStringBuffer(key, ":")
18 + " did not exist on table:" + tableID, cause);
19 }
20
21 public ObjectDoesntExistException(final IKVTableID tableID, final byte[] key) {
22 super(ByteArrayUtil.toHexStringBuffer(key, ":")
23 + " did not exist on table:" + tableID);
24 }
25}