3737e1b03b31383ddc8a82a40ffdf28fb6b36da7
[packetcable.git] / packetcable-driver / src / main / java / org / pcmm / utils / PCMMException.java
1 /*
2  * (c) 2015 Cable Television Laboratories, Inc.  All rights reserved.
3  */
4
5 package org.pcmm.utils;
6
7 import org.pcmm.gates.IPCMMError;
8
9 /**
10  * Defines the Exception that could be thrown by the API.
11  * 
12  */
13 public class PCMMException extends Exception {
14
15         public PCMMException(IPCMMError error) {
16                 this(error.getDescription(), error.getErrorCode().getCode());
17         }
18
19         public PCMMException(String message, int code) {
20                 super("error code [" + code + "]" + message);
21         }
22
23 }