Yuta HIGUCHI | 66ca1bf | 2014-03-12 18:34:09 -0700 | [diff] [blame] | 1 | package net.onrc.onos.datastore; |
| 2 | |
| 3 | import net.onrc.onos.datastore.utils.ByteArrayUtil; |
| 4 | |
| 5 | /** |
| 6 | * Exception thrown when object was expected, but not found in data store. |
| 7 | */ |
| 8 | public 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 | } |