org.capi.capi20
Class CapiException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--org.capi.capi20.CapiException
All Implemented Interfaces:
java.io.Serializable

public class CapiException
extends java.lang.Exception

CapiException is used by Capi to signal CAPI Errors.

© 2002 Holger Gräfe

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

Contact to author: holger.graefe@gmx.de

Project website: http://jcapi.sourceforge.net

See Also:
Serialized Form

Constructor Summary
CapiException()
           
CapiException(int returncode)
          builds a CapiException for a native CAPI error.
CapiException(int returncode, java.lang.String msg)
          builds a CapiException for a native CAPI error codes with customized messages.
CapiException(java.lang.String msg)
           
 
Method Summary
static java.lang.String decode(int code)
          calculates the error message assigned to the given CAPI error code.
 int getCapiCode()
          returns the CAPI error code or 0 if this exception is not a native CAPI error.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CapiException

public CapiException()

CapiException

public CapiException(java.lang.String msg)
Parameters:
msg - the exception message

CapiException

public CapiException(int returncode)
builds a CapiException for a native CAPI error.
Parameters:
returncode - the CAPI error code

CapiException

public CapiException(int returncode,
                     java.lang.String msg)
builds a CapiException for a native CAPI error codes with customized messages.
Parameters:
returncode - the CAPI error code
msg - the error message
Method Detail

getCapiCode

public int getCapiCode()
returns the CAPI error code or 0 if this exception is not a native CAPI error.
Returns:
the error code

decode

public static java.lang.String decode(int code)
calculates the error message assigned to the given CAPI error code.
Parameters:
returncode - the CAPI error code
Returns:
the error message