Bull DPX/20 Guia do Utilizador Página 195

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 424
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 194
2-27
DSOM Framework Reference
set_exception Method
Purpose
Returns an exception to a client.
IDL Syntax
void set_exception (
in exception_type major,
in string except_name,
in void* param);
Description
The set_exception method returns an exception to the client. The major parameter can
have one of three possible values:
NO_EXCEPTION — indicates a normal outcome of the operation. It is not necessary to
invoke set_exception to indicate a normal outcome; it is the default
behavior if the method simply returns.
USER_EXCEPTION — indicates a user-defined exception.
SYSTEM_EXCEPTION — indicates a system-defined exception.
Parameters
receiver A pointer to a BOA (SOMOA) object for the server.
env A pointer to the Environment structure for the method caller.
major One of the exception types NO_EXCEPTION, USER_EXCEPTION, or
SYSTEM_EXCEPTION.
except_name A string representing the exception type identifier.
param A pointer to the associated data.
Example
#include <somd.h>
#include <myobject.h> /* provided by user */
/* assuming following IDL declarations in the MyObject interface:
* exception foo;
* void myMethod() raises (BadCall);
* then within the implementation of myMethod, the
* following call can raise a BadCall exception: */
_set_exception(SOMD_SOMOAObject,
&ev, USER_EXCEPTION, ex_MyObject_BadCall, NULL);
Original Class
BOA
Vista de página 194
1 2 ... 190 191 192 193 194 195 196 197 198 199 200 ... 423 424

Comentários a estes Manuais

Sem comentários