Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Throwing exceptions is done in the servant that implements the IDL method that declared the error.

  • Python

    Code Block
    languagepy
    linenumberstrue
    collapsetrue
    import SYSTEMErrImpl
    ...
        raise SYSTEMErrImpl.AlreadyInAutomaticExImpl().getAlreadyInAutomaticEx()
    ...
  • Java

    Code Block
    languagejava
    linenumberstrue
    collapsetrue
    import alma.SYSTEMErr.wrappers.AcsJAlreadyInAutomaticEx;
    ...
        throw new AcsJAlreadyInAutomaticEx("Some message...").toAlreadyInAutomaticEx();
    ...
  • C++

    Code Block
    languagecpp
    linenumberstrue
    collapsetrue
    #include <SYSTEMErr.h>
    ...
        throw SYSTEMErr::AlreadyInAutomaticExImpl(__FILE__, __LINE__, "Some message...").getAlreadyInAutomaticEx();
    ...

...

Handling is done in the component or client that calls a component through its stub.

  • Python

    Code Block
    languagepy
    linenumberstrue
    collapsetrue
    import SYSTEMErr
    ...
        try:
            ...
        except SYSTEMErr.AlreadyInAutomaticEx as e:
            ...
    ...
  • Java

    Code Block
    languagejava
    linenumberstrue
    collapsetrue
    import alma.SYSTEMErr.AlreadyInAutomaticEx;
    ...
        try {
            ...
        } catch (AlreadyInAutomaticEx e) {
            ...
        }
    ...
  • C++

    Code Block
    languagecpp
    linenumberstrue
    collapsetrue
    #include <SYSTEMErr.h>
    ...
        try {
            ...
        } catch(SYSTEMErr::AlreadyInAutomaticEx &_ex) {
            ...
        }
    ...