Add missing license headers to packetcable-driver utils
[packetcable.git] / packetcable-driver / src / main / java / org / pcmm / utils / PCMMException.java
1 /*
2  * Copyright (c) 2014, 2015 Cable Television Laboratories, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8
9 package org.pcmm.utils;
10
11 import org.pcmm.gates.IPCMMError;
12
13 /**
14  * Defines the Exception that could be thrown by the API.
15  *
16  */
17 public class PCMMException extends Exception {
18
19         public PCMMException(IPCMMError error) {
20                 this(error.getDescription(), error.getErrorCode().getCode());
21         }
22
23         public PCMMException(String message, int code) {
24                 super("error code [" + code + "]" + message);
25         }
26
27 }