Example usage for javax.naming InsufficientResourcesException InsufficientResourcesException

List of usage examples for javax.naming InsufficientResourcesException InsufficientResourcesException

Introduction

In this page you can find the example usage for javax.naming InsufficientResourcesException InsufficientResourcesException.

Prototype

public InsufficientResourcesException(String explanation) 

Source Link

Document

Constructs a new instance of InsufficientResourcesException using an explanation.

Usage

From source file:org.restcomm.connect.java.sdk.Accounts.SubAccountCreator.java

public SubAccount create() {
    try {/*w  ww.  j a v  a 2s .  c om*/
        if (email && password && role) {
            Restcomm.sendRequest(request);
            //System.out.println(Restcomm.getJSONResponse());
            return (SubAccount) Utilities.AccountObject(Restcomm.getJSONResponse());
        } else
            throw new InsufficientResourcesException(
                    "You need to specify Email,Password and Role for this request");
    } catch (InsufficientResourcesException e) {
        System.out.println(e);
        e.printStackTrace();
    }
    return null;

}