Versions Compared

Key

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

...

Code Block
languagepy
titlePython Types Usage
#From IDL <Module>::<EnumName>::READY<VALUE>
<Module>.READY<VALUE>

#From IDL <Module>::<Interface>::<Enumname>::OFFLINE<VALUE>
Observatory<Module>.Service<Interface>.OFFLINE<VALUE>

To retrieve a component to interact with, simply do the following:

...

Code Block
languagepy
titlePython Error Handling
#For catching exceptions
except <Interface>Err.<ExceptionName>Ex as e:

#For raising exceptions
raise <Interface>ErrImpl.<ExceptionName>ExImpl().get<ExceptionName>Ex()

#For raising exceptions with parameters
err = <Interface>ErrImpl.<ExceptionName>ExImpl()
err.set<ParamName>(<Value>)
raise err.get<ExceptionName>Ex()

#For logging an error message from the exceptions
err = <Interface>ErrImpl.<ExceptionName>ExImpl()
err.log()
raise err.get<ExceptionName>Ex()