Package com.betfair.cougar.core.api.exception

Examples of com.betfair.cougar.core.api.exception.CougarException


        switch (er.getResultType()) {
            case Success:
                return (SimpleListContainer) er.getResult();

            case Fault:
                CougarException cex = er.getFault();

                if (cex.getServerFaultCode() == ServerFaultCode.ServiceCheckedException) {
                    List<String[]> exceptionParams = cex.getFault().getDetail().getFaultMessages();
                    String className = cex.getFault().getDetail().getDetailMessage();
                    if (className.equals("SimpleException")) {
                        throw new SimpleException(
                                                cex.getResponseCode(),
                                                   SimpleExceptionErrorCodeEnum.valueOf(exceptionParams.get(0)[1]),
                                                   (exceptionParams.get(1)[1])
                                              );
                    }
View Full Code Here


        switch (er.getResultType()) {
            case Success:
                return (SimpleResponse) er.getResult();

            case Fault:
                CougarException cex = er.getFault();

                if (cex.getServerFaultCode() == ServerFaultCode.ServiceCheckedException) {
                    List<String[]> exceptionParams = cex.getFault().getDetail().getFaultMessages();
                    String className = cex.getFault().getDetail().getDetailMessage();
                    if (className.equals("SimpleException")) {
                        throw new SimpleException(
                                                cex.getResponseCode(),
                                                   SimpleExceptionErrorCodeEnum.valueOf(exceptionParams.get(0)[1]),
                                                   (exceptionParams.get(1)[1])
                                              );
                    }
View Full Code Here

        switch (er.getResultType()) {
            case Success:
                return (Map<String,SimpleResponse>) er.getResult();

            case Fault:
                CougarException cex = er.getFault();

                if (cex.getServerFaultCode() == ServerFaultCode.ServiceCheckedException) {
                    List<String[]> exceptionParams = cex.getFault().getDetail().getFaultMessages();
                    String className = cex.getFault().getDetail().getDetailMessage();
                    if (className.equals("SimpleException")) {
                        throw new SimpleException(
                                                cex.getResponseCode(),
                                                   SimpleExceptionErrorCodeEnum.valueOf(exceptionParams.get(0)[1]),
                                                   (exceptionParams.get(1)[1])
                                              );
                    }
View Full Code Here

        switch (er.getResultType()) {
            case Success:
                return (List<SimpleResponse>) er.getResult();

            case Fault:
                CougarException cex = er.getFault();

                if (cex.getServerFaultCode() == ServerFaultCode.ServiceCheckedException) {
                    List<String[]> exceptionParams = cex.getFault().getDetail().getFaultMessages();
                    String className = cex.getFault().getDetail().getDetailMessage();
                    if (className.equals("SimpleException")) {
                        throw new SimpleException(
                                                cex.getResponseCode(),
                                                   SimpleExceptionErrorCodeEnum.valueOf(exceptionParams.get(0)[1]),
                                                   (exceptionParams.get(1)[1])
                                              );
                    }
View Full Code Here

        switch (er.getResultType()) {
            case Success:
                return (SimpleResponse) er.getResult();

            case Fault:
                CougarException cex = er.getFault();

                if (cex.getServerFaultCode() == ServerFaultCode.ServiceCheckedException) {
                    List<String[]> exceptionParams = cex.getFault().getDetail().getFaultMessages();
                    String className = cex.getFault().getDetail().getDetailMessage();
                    if (className.equals("SimpleException")) {
                        throw new SimpleException(
                                                cex.getResponseCode(),
                                                   SimpleExceptionErrorCodeEnum.valueOf(exceptionParams.get(0)[1]),
                                                   (exceptionParams.get(1)[1])
                                              );
                    }
View Full Code Here

        switch (er.getResultType()) {
            case Success:
                return (SimpleResponse) er.getResult();

            case Fault:
                CougarException cex = er.getFault();

                if (cex.getServerFaultCode() == ServerFaultCode.ServiceCheckedException) {
                    List<String[]> exceptionParams = cex.getFault().getDetail().getFaultMessages();
                    String className = cex.getFault().getDetail().getDetailMessage();
                    if (className.equals("SimpleException")) {
                        throw new SimpleException(
                                                cex.getResponseCode(),
                                                   SimpleExceptionErrorCodeEnum.valueOf(exceptionParams.get(0)[1]),
                                                   (exceptionParams.get(1)[1])
                                              );
                    }
View Full Code Here

        switch (er.getResultType()) {
            case Success:
                return (SimpleResponse) er.getResult();

            case Fault:
                CougarException cex = er.getFault();

                if (cex.getServerFaultCode() == ServerFaultCode.ServiceCheckedException) {
                    List<String[]> exceptionParams = cex.getFault().getDetail().getFaultMessages();
                    String className = cex.getFault().getDetail().getDetailMessage();
                    if (className.equals("SimpleException")) {
                        throw new SimpleException(
                                                cex.getResponseCode(),
                                                   SimpleExceptionErrorCodeEnum.valueOf(exceptionParams.get(0)[1]),
                                                   (exceptionParams.get(1)[1])
                                              );
                    }
View Full Code Here

        switch (er.getResultType()) {
            case Success:
                return (Long) er.getResult();

            case Fault:
                CougarException cex = er.getFault();

                if (cex.getServerFaultCode() == ServerFaultCode.ServiceCheckedException) {
                    List<String[]> exceptionParams = cex.getFault().getDetail().getFaultMessages();
                    String className = cex.getFault().getDetail().getDetailMessage();
                    if (className.equals("SimpleException")) {
                        throw new SimpleException(
                                                cex.getResponseCode(),
                                                   SimpleExceptionErrorCodeEnum.valueOf(exceptionParams.get(0)[1]),
                                                   (exceptionParams.get(1)[1])
                                              );
                    }
View Full Code Here

        switch (er.getResultType()) {
            case Success:
                return (SimpleResponse) er.getResult();

            case Fault:
                CougarException cex = er.getFault();

                if (cex.getServerFaultCode() == ServerFaultCode.ServiceCheckedException) {
                    List<String[]> exceptionParams = cex.getFault().getDetail().getFaultMessages();
                    String className = cex.getFault().getDetail().getDetailMessage();
                    if (className.equals("SimpleException")) {
                        throw new SimpleException(
                                                cex.getResponseCode(),
                                                   SimpleExceptionErrorCodeEnum.valueOf(exceptionParams.get(0)[1]),
                                                   (exceptionParams.get(1)[1])
                                              );
                    }
View Full Code Here

        if (!executionResult.isFault()) {
            wrapped.onResult(executionResult);
            return;
        }

        CougarException ce = executionResult.getFault();
        if (ce instanceof CougarClientException) {
            wrapped.onResult(new ExecutionResult(new CougarServiceException(ServerFaultCode.ServiceRuntimeException,"Unhandled client exception",ce)));
        }
        else {
            wrapped.onResult(executionResult);
View Full Code Here

TOP

Related Classes of com.betfair.cougar.core.api.exception.CougarException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.