Examples of ErrorEvent


Examples of com.vaadin.server.ErrorEvent

                ListenerMethod listenerMethod = (ListenerMethod) listeners[i];
                if (null != errorHandler) {
                    try {
                        listenerMethod.receiveEvent(event);
                    } catch (Exception e) {
                        errorHandler.error(new ErrorEvent(e));
                    }
                } else {
                    listenerMethod.receiveEvent(event);
                }
            }
View Full Code Here

Examples of com.vaadin.terminal.Terminal.ErrorEvent

            ds.setCacheTime(cacheTime);
            return ds;
        } catch (final FileNotFoundException e) {
            // Log the exception using the application error handler
            getApplication().getErrorHandler().terminalError(new ErrorEvent() {

                public Throwable getThrowable() {
                    return e;
                }
View Full Code Here

Examples of com.vaadin.terminal.Terminal.ErrorEvent

                    sourceFile), getMIMEType(), getFilename());
            ds.setCacheTime(cacheTime);
            return ds;
        } catch (final FileNotFoundException e) {
            // Log the exception using the application error handler
            getApplication().getErrorHandler().terminalError(new ErrorEvent() {

                public Throwable getThrowable() {
                    return e;
                }
View Full Code Here

Examples of jpos.events.ErrorEvent

        this.fireEvent(event);
    }

    private void parseMsrString(String str) {
        if (str.indexOf(";") == -1 || str.indexOf("^") == -1) {
            ErrorEvent error = new ErrorEvent(this, JposConst.JPOS_E_FAILURE, -1,
                    JposConst.JPOS_EL_INPUT, JposConst.JPOS_ER_CLEAR);
            this.fireEvent(error);
            return;
        }

        try {
            // parse the tracks from the character string
            String track1 = str.substring(0, str.indexOf(";"));
            String track2 = str.substring(str.indexOf(";"), str.length() - 1);

            // track 1 data
            int firstCarrot = track1.indexOf("^", 2);
            int nextCarrot = track1.indexOf("^", firstCarrot + 1);

            String tr1BegChar = track1.substring(0, 1);
            String formatCode = track1.substring(1, 2);
            String tr1AcctNum = track1.substring(2, firstCarrot);
            String cardHolder = track1.substring(firstCarrot + 1, nextCarrot);
            String tr1ExpDate = track1.substring(nextCarrot + 1, nextCarrot + 5);
            String tr1OptData = track1.substring(nextCarrot + 4, track1.length() - 2);
            String tr1EndChar = track1.substring(track1.length() - 2, track1.length() - 1);
            String tr1LrcCode = track1.substring(track1.length() - 1, track1.length());

            // track 2 data
            String tr2BegChar = track2.substring(0, 1);
            String tr2AcctNum = track2.substring(1, track2.indexOf("="));
            String tr2ExpDate = track2.substring((track2.indexOf("=") + 1), track2.indexOf("=") + 5);
            String tr2OptData = track2.substring(track2.indexOf("=") + 5, track2.length() - 2);
            String tr2EndChar = track2.substring(track2.length() - 2, track2.length() - 1);
            String tr2LrcCode = track2.substring(track2.length() - 1, track2.length());

            // see if we need to remove the sentinels
            if (this.sendSentinels) {
                track1 = track1.substring(0, track1.length() - 1);
                track2 = track2.substring(0, track2.length() - 1);
            } else {
                track1 = track1.substring(1, track1.length() - 2);
                track2 = track2.substring(0, track2.length() - 2);
            }

            // set the raw track data
            this.track1Data = track1.getBytes();
            this.track2Data = track2.getBytes();

            // parse the decoded data
            if (this.parseDecodeData) {
                // set the sentinels
                this.sentinels = new int[4];
                this.sentinels[0] = (int) tr1BegChar.charAt(0);
                this.sentinels[1] = (int) tr1EndChar.charAt(0);
                this.sentinels[2] = (int) tr2BegChar.charAt(0);
                this.sentinels[3] = (int) tr2EndChar.charAt(0);

                // set the lrcs
                this.lrc = new int[2];
                this.lrc[0] = (int) tr1LrcCode.charAt(0);
                this.lrc[1] = (int) tr2LrcCode.charAt(0);

                // set the account number
                this.accountNumber = new String[2];
                this.accountNumber[0] = tr1AcctNum.trim();
                this.accountNumber[1] = tr2AcctNum.trim();

                // set the expiration date
                this.expireDate = new String[2];
                this.expireDate[0] = tr1ExpDate.trim();
                this.expireDate[1] = tr2ExpDate.trim();

                // track discretionar info
                this.track1DiscretionaryData = tr1OptData.getBytes();
                this.track2DiscretionaryData = tr2OptData.getBytes();
                this.track1Data = track1.getBytes();
                this.track2Data = track2.getBytes();

                // other field data (i.e. name)
                this.serviceCode = formatCode.trim();
                this.surname = (cardHolder.substring(0, cardHolder.indexOf("/"))).trim();
                this.firstname = (cardHolder.substring((cardHolder.indexOf("/") + 1))).trim();
                // not sure how to support title, middle initial, and suffix
            }
        } catch (Exception e) {
            ErrorEvent error = new ErrorEvent(this, JposConst.JPOS_E_FAILURE, -1,
                    JposConst.JPOS_EL_INPUT, JposConst.JPOS_ER_CLEAR);
            this.fireEvent(error);
            return;
        }
    }
View Full Code Here

Examples of jpower.socket.event.ErrorEvent

            inputHandler = new InputHandler(this);
            outputHandler = new OutputHandler(this);
            inputHandler.start();
            getEventBus().dispatchEvent(new ConnectEvent(powerSocket));
        } catch (IOException e) {
            getEventBus().dispatchEvent(new ErrorEvent(1, e, powerSocket));
        }
    }
View Full Code Here

Examples of net.sourceforge.squirrel_sql.plugins.dbcopy.event.ErrorEvent

     * Send an error event message to all CopyTableListeners
     * @param type the type of the ErrorEvent.
     * @param e the exception that was encountered.
     */   
    private void sendErrorEvent(int type, Exception e) {
        ErrorEvent event = new ErrorEvent(prov, type);
        event.setException(e);
        Iterator<CopyTableListener> i = listeners.iterator();
        while (i.hasNext()) {
            CopyTableListener listener = i.next();
            listener.handleError(event);
        }       
View Full Code Here

Examples of org.apache.tools.ant.gui.event.ErrorEvent

                    String message = getContext().getResources().getMessage(
                        SaveCmd.class, "saveError",
                        new Object[] { _location.toString() });
                   
                    getContext().getEventBus().
                        postEvent(new ErrorEvent(getContext(), message, ex));
                }
            }
        }
        else {
            // We shouldn't ever get here.
            String message = getContext().getResources().getString(
                SaveCmd.class, "noProject");
           
            getContext().getEventBus().
                postEvent(new ErrorEvent(getContext(), message));
           
        }
    }
View Full Code Here

Examples of org.openbp.jaspira.plugins.errordialog.ErrorEvent

      msgPosition.setObjectPath(null);
      String message = "Exception in process '" + msgPosition + "':";

      if (dse.getException() != null)
      {
        fireEvent(new ErrorEvent(DebuggerPlugin.this, message, dse.getException()));
      }
      else
      {
        fireEvent(new ErrorEvent(DebuggerPlugin.this, message, dse.getExceptionString()));
      }

      // Automatically respond to the server with a 'resume' command.
      // This will continue the current process (if it can be continued) with the error handling.
      // If it cannot be resumed, the process must be restarted again by the user...
View Full Code Here

Examples of org.richfaces.photoalbum.model.event.ErrorEvent

     *
     * @param error - error to show
     *
     */
    public void showError(String summary, String errorMessage) {
        error.fire(new ErrorEvent(summary, errorMessage));
    }
View Full Code Here

Examples of org.richfaces.photoalbum.model.event.ErrorEvent

     */
    public void search() {
        searchOptionsHolder = null;
        if (!isSearchOptionSelected()) {
            // If no options selected
            error.fire(new ErrorEvent(Constants.SEARCH_NO_OPTIONS_ERROR));
            return;
        }
        if (!isWhereSearchOptionSelected()) {
            // If both search in My and search is shared unselected
            error.fire(new ErrorEvent(Constants.SEARCH_NO_WHERE_OPTIONS_ERROR));
            return;
        }
        keywords = new ArrayList<String>();
        // Update view
        navEvent.fire(new NavEvent(NavigationEnum.SEARCH));
        // parse query
        keywords = parse(searchQuery);
        Iterator<ISearchOption> it = options.iterator();
        // Search by first keyword by default
        selectedKeyword = keywords.get(0).trim();
        while (it.hasNext()) {
            ISearchOption option = it.next();
            try {
                if (option.getSelected()) {
                    option.search(searchAction, selectedKeyword, seachInMyAlbums, searchInShared);
                }
            } catch (PhotoAlbumException e) {
                error.fire(new ErrorEvent("Error", option.getName() + ":" + e.getMessage()));
            }
        }
        searchOptionsHolder = new SearchInformationHolder(new ArrayList<ISearchOption>(options), seachInMyAlbums,
            searchInShared);
        searchQuery = "";
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.