internalerrorevent.java
来自「CmisJavaApi」· Java 代码 · 共 101 行
JAVA
101 行
/* * The contents of this file are subject to the Dyade Public License, * as defined by the file DYADE_PUBLIC_LICENSE.TXT * * You may not use this file except in compliance with the License. You may * obtain a copy of the License on the Dyade web site (www.dyade.fr). * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for * the specific terms governing rights and limitations under the License. * * The Original Code is CmisJava API, including the java package * fr.dyade.cmis, released September 5, 2000. * * The Initial Developer of the Original Code is Dyade. The Original Code and * portions created by Dyade are Copyright Bull and Copyright INRIA. * All Rights Reserved. *//* Copyright 1996-2000 by Institut National de Recherche en Informatique * et en Automatique (INRIA) * All rights reserved. See COPYRIGHT in top-level directory. * * Authors: Laurent Andrey, Eric Dillon, Olivier Festor *//* $Id: InternalErrorEvent.java,v 1.2 2000/09/05 13:05:11 festor Exp $ $Source: /local/resedas/CVS-Repository/CmisJavaApi/src/fr/dyade/cmis/api/operation/event/InternalErrorEvent.java,v $*/package fr.dyade.cmis.api.operation.event;import fr.dyade.cmis.api.CMISStack;/** * Event class to collect various errors (exception) from stack implementation threads. * The event source for such event is the stack itself. Usually Error is supposed to report an Exception so * an extra info field is added to this event class. * @version cvs $Id: InternalErrorEvent.java,v 1.2 2000/09/05 13:05:11 festor Exp $ */public class InternalErrorEvent extends CMISEvent { /** Build an InternalErrorEvent for stack and exception * @param s the stack implementation which generated this error * @param initialException the initial exception caught before posting this event */ public InternalErrorEvent( CMISStack s, Throwable initialException ){ super(s); this.initialException=initialException; } /** Build an InternalErrorEvent for stack, exception and extra message. * @param s the stack implementation which generated this error * @param initialException the initial exception caught before posting this event * @param message an extra message to keep this the event */ public InternalErrorEvent( CMISStack s, Throwable initialException, String message ){ super(s); this.initialException=initialException; this.message=message; } /** Get the CMIS stack where the error occurred. * This method is required by super class (CMISEvent). * @return the faulty stack. */ public final CMISStack _getStack() { return (CMISStack)getSource(); } /** Get the CMIS stack where the error occurred. * This method does exactly the same job as <code>_getStack</code> * @return the faulty stack. */ public final CMISStack getStack() { return _getStack(); } /** Get the the exception from which the event has been made. * @return the initial exception. */ public Throwable getInitialException() { return initialException; } /** Get extra info message. * @return an extra info message (may be blank, never null) */ public String getMessage() { return (message==null)?"":message; } /** Get the class tag. * This uggly trick is dedicated to event thread and dispatching. */ public final short getTag() { return INTERNAL_ERROR_EVENT; } /** Get "user friendly" from of this event. * @return the string form of the CMIS stack related to the * the error and if available the toString form of the originator exception. */ public String toString() { return getStack().toString()+ ((initialException!=null)?(": "+initialException.toString()):" no initial exeption"); } private Throwable initialException; private String message;}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?