Examples of ErrorCode


Examples of org.jasig.portal.channels.error.ErrorCode

     * @param throwable - cause of failed channel's failure
     * @param channelSubscribeId - identifies the failed channel
     * @param channelInstance - the failed channel
     */
    public CError(int errorCode, Throwable throwable, String channelSubscribeId, IChannel channelInstance) {
        ErrorCode codeObject = ErrorCode.codeForInt(errorCode);
        this.delegate =
            new org.jasig.portal.channels.error.CError(codeObject, throwable,
                    channelSubscribeId, channelInstance);
    }
View Full Code Here

Examples of org.jclouds.virtualbox.domain.ErrorCode

      HardDisk hardDisk = HardDisk.builder().diskpath(path).controllerPort(0).deviceSlot(0).build();
      try {
         new CreateMediumIfNotAlreadyExists(manager, machineUtils, true).apply(hardDisk);
         fail();
      } catch (VBoxException e) {
         ErrorCode errorCode = ErrorCode.valueOf(e);
         assertEquals(errorCode, ErrorCode.VBOX_E_FILE_ERROR);
      }
   }
View Full Code Here

Examples of org.jclouds.virtualbox.domain.ErrorCode

      try {
         Injector injector = view.utils().injector();
         injector.getInstance(CreateAndRegisterMachineFromIsoIfNotAlreadyExists.class).apply(machineSpec);
         fail();
      } catch (VBoxException e) {
         ErrorCode errorCode = ErrorCode.valueOf(e);
         // According to the documentation VBOX_E_OBJECT_NOT_FOUND
         // if osTypeId is not found.
         assertEquals(errorCode, ErrorCode.VBOX_E_OBJECT_NOT_FOUND);
      }
      undoVm(vmName);
View Full Code Here

Examples of org.jclouds.virtualbox.domain.ErrorCode

      try {
         final IProgress progress = machine
                 .launchVMProcess(session, type.stringValue(), environment);
         progress.waitForCompletion(-1);
      } catch (VBoxException e) {
         ErrorCode errorCode = ErrorCode.valueOf(e);
         switch (errorCode) {
            case VBOX_E_INVALID_OBJECT_STATE:
               logger.warn(e, "Could not start machine. Got error code %s from launchMachine(). "
                       + "The machine might already be running.", errorCode);
               break;
View Full Code Here

Examples of org.oasis_open.docs.wsrf._2004._06.wsrf_ws_basefaults_1_2_draft_01.BaseFaultType.ErrorCode

            Object subscriptionPolicy,
            @WebParam(name = "InitialTerminationTime", targetNamespace = "http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd")
            XMLGregorianCalendar terminationTime) throws ResourceUnknownFault, SubscribeCreationFailedFault {
       
        ResourceUnknownFaultType ru = new ResourceUnknownFaultType();
        ErrorCode code = new ErrorCode();
        code.setDialect("en");
        ru.setErrorCode(code);
       
        throw new ResourceUnknownFault("Foo", ru);
    }
View Full Code Here

Examples of org.objectweb.hello_world_soap_http.types.ErrorCode

        docLitFaultCount.incrementAndGet();
        if (faultType.equals(BadRecordLitFault.class.getSimpleName())) {
            throw new BadRecordLitFault("TestBadRecordLit", "BadRecordLitFault");
        }
        if (faultType.equals(NoSuchCodeLitFault.class.getSimpleName())) {
            ErrorCode ec = new ErrorCode();
            ec.setMajor((short)1);
            ec.setMinor((short)1);
            NoSuchCodeLit nscl = new NoSuchCodeLit();
            nscl.setCode(ec);
            throw new NoSuchCodeLitFault("TestNoSuchCodeLit", nscl);
        }
    }
View Full Code Here

Examples of org.objectweb.hello_world_soap_http.types.ErrorCode

        verifyMAPs();
        if (faultType.equals(BadRecordLitFault.class.getSimpleName())) {
            throw new BadRecordLitFault("TestBadRecordLit", "BadRecordLitFault");
        }
        if (faultType.equals(NoSuchCodeLitFault.class.getSimpleName())) {
            ErrorCode ec = new ErrorCode();
            ec.setMajor((short)1);
            ec.setMinor((short)1);
            NoSuchCodeLit nscl = new NoSuchCodeLit();
            nscl.setCode(ec);
            throw new NoSuchCodeLitFault("TestNoSuchCodeLit", nscl);
        }
    }
View Full Code Here

Examples of org.objectweb.hello_world_soap_http.types.ErrorCode

    public void testDocLitFault(String faultType) throws BadRecordLitFault, NoSuchCodeLitFault {
        if (faultType.equals(BadRecordLitFault.class.getSimpleName())) {
            throw new BadRecordLitFault("TestBadRecordLit", "BadRecordLitFault");
        }
        if (faultType.equals(NoSuchCodeLitFault.class.getSimpleName())) {
            ErrorCode ec = new ErrorCode();
            ec.setMajor((short)1);
            ec.setMinor((short)1);
            NoSuchCodeLit nscl = new NoSuchCodeLit();
            nscl.setCode(ec);
            throw new NoSuchCodeLitFault("TestNoSuchCodeLit", nscl);
        }
    }
View Full Code Here

Examples of org.objectweb.hello_world_soap_http.types.ErrorCode

    public void testMarshalDocLiteralUserFaults() throws Exception {
        //Test The InputMessage of GreetMe Operation
        soapContext.put(ObjectMessageContext.MESSAGE_INPUT, false);

        String exMessage = new String("Test Exception");
        ErrorCode ec = new ErrorCode();
        ec.setMajor((short)1);
        ec.setMinor((short)1);
        NoSuchCodeLit nscl = new NoSuchCodeLit();
        nscl.setCode(ec);
        NoSuchCodeLitFault ex = new NoSuchCodeLitFault(exMessage, nscl);
        objContext.setException(ex);
View Full Code Here

Examples of org.objectweb.hello_world_soap_http.types.ErrorCode

        NoSuchCodeLitFault nscf = (NoSuchCodeLitFault)faultEx;
        assertNotNull(nscf.getFaultInfo());
        NoSuchCodeLit faultInfo = nscf.getFaultInfo();

        assertNotNull(faultInfo.getCode());
        ErrorCode ec = faultInfo.getCode();
        assertEquals(ec.getMajor(), (short)666);
        assertEquals(ec.getMinor(), (short)999);
       
        assertEquals(nscf.getMessage(), "Test Exception");
       
        is =  getClass().getResourceAsStream("resources/BadRecordDocLiteral.xml");
        faultMsg = binding.getMessageFactory().createMessage(null,  is);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.