Examples of Exception


Examples of com.sun.star.uno.Exception

                null, details.function, language, ScriptFrameworkErrorType.NO_SUCH_SCRIPT );
        }
        catch ( com.sun.star.lang.WrappedTargetException wta )
        {
            // TODO specify the correct error Type
            Exception wrapped = (Exception)wta.TargetException;
            String message = wta.getMessage();
            if ( wrapped != null )
            {
                message = wrapped.getMessage();
            }
            throw new ScriptFrameworkErrorException( message,
                null, details.function, language, ScriptFrameworkErrorType.UNKNOWN );
        }
View Full Code Here

Examples of com.sun.star.uno.Exception

            XSpreadsheet xSheet = getSpreadSheetFromSheetDoc(xSheetDoc, sheetNumber);

            fillCalcSheetWithContent(xSheet, startCellX, startCellY, rangeLengthX, rangeLengthY);

        } catch (Exception e){
                throw new Exception(
                        "Couldn't fill CalcSheet with content: " + e.toString());
        }
    }           
View Full Code Here

Examples of com.sun.star.uno.Exception

            XCellRange xRange = null;
            try {
                xRange = xSheet.getCellRangeByPosition(startCellX, startCellY,
                                    startCellX+rangeLengthX-1, startCellY+rangeLengthY-1);
            } catch ( IndexOutOfBoundsException e){
                    throw new Exception(
                            "Couldn't get CellRange from sheett: " + e.toString());
            }

            XCellRangeData xRangeData = (XCellRangeData) UnoRuntime.queryInterface(XCellRangeData.class, xRange);

            xRangeData.setDataArray(newData);
        } catch (Exception e){
                throw new Exception(
                        "Couldn't fill CalcSheet with content: " + e.toString());
        }
    }
View Full Code Here

Examples of com.sun.star.uno.Exception

            try{
                xSheet = (XSpreadsheet) AnyConverter.toObject(
                        new Type(XSpreadsheet.class),xSheetsIndexArray.getByIndex(sheetNumber));

            } catch (IllegalArgumentException e){
                throw new Exception(
                        "Couldn't get sheet '" +sheetNumber + "' : " + e.toString());
            } catch (IndexOutOfBoundsException e){
                throw new Exception(
                        "Couldn't get sheet '" +sheetNumber + "' : " + e.toString());
            } catch (WrappedTargetException e){
                throw new Exception(
                        "Couldn't get sheet '" +sheetNumber + "' : " + e.toString());
            }
        } catch (Exception e){
            throw new Exception(
                "Couldn't get sheet '" +sheetNumber + "' : " + e.toString());
        }  
         return xSheet;
    }
View Full Code Here

Examples of general.exceptions.Exception

    {
      throw new DestinationNotPassableException("Ziel ist nicht befahrbar!", mc_to);
    }
    if(mc_from.equals(mc_to))
    {
      throw new Exception("Ausgangspunkt und Ziel sind identisch!");
    }

    System.out.println("Exceptions ueberlebt");

    boolean routeFound = false;
View Full Code Here

Examples of java.lang.Exception

        connection.setInstanceFollowRedirects(false);

        connection.connect();

        if (connection.getResponseCode() != 200) {
            throw new Exception("Invalid HTTP Response code " + connection.getResponseCode());
        }

        return IOUtils.toString(connection.getInputStream(), "UTF-8");
    }
View Full Code Here

Examples of java.lang.Exception

        }

        String response = fetchURL(url);

        if (response == null)
            throw new Exception("Server Returned NULL Response");

        Map<String, Object> obj = (Map<String, Object>) JSONValue.parse(response);

        if (obj.get("error") != null)
            throw new Exception((String) obj.get("error"));

        return (String)obj.get("input_address");
    }
View Full Code Here

Examples of java.lang.Exception

        } catch (Exception e) {
            System.out.println("Message check failed: ");
            e.printStackTrace();
        }
        if (failbuild)
            throw new Exception("Message check failed. \n" +
                "See error in build output or call ant runmessagecheck.");
    }   
View Full Code Here

Examples of java.lang.Exception

    if (ontology==null) {
      try {
        ontology = new OntologyFactory(this.conf).getOntology();
      } catch (Exception e) {
        throw new Exception("Failed to instantiate ontology");
      }
    }

    //foreach sample file
    for (int i=0; i<sampleFiles.length; i++) {
View Full Code Here

Examples of java.lang.Exception

                dto = new PolicyDTO();
                dto.setPolicy(new String(content));
                dto.setPolicy(dto.getPolicy().trim().replaceAll(">\\s+<", "><"));
                stub.addPolicy(dto);
            } else {
                throw new Exception("Error while importing the policy at the backend service");
            }
        } catch (Exception e) {
            String message = e.getMessage();
            handleException(message, e);
        }
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.