Open (Daemon subroutine)
Jump to navigation
Jump to search
Open a file/group on the Daemon thread (Daemon class)
Open is used to open a file or group on the daemon thread that is already open on the invoking (master) thread. The file or group is opened with the same privileges with which it is open on the master thread.
Syntax
daemon:Open( string, [Default= boolean]) Throws DaemonLost, IncorrectDaemonState
Syntax terms
%daemon | A previously defined Daemon object. |
---|---|
string | The name of the file or group to be opened on the daemon thread. string is case sensitive; you must use all-uppercase characters.
Use the following syntax for string (note that Temp groups are not allowed): [File | [Perm] Group] name] |
Default | An optional, name required, parameter which specifies whether the file or group to be opened will be the default file or group for this the daemon thread. Default is a Boolean enumeration that defaults to False, meaning that the Open method does not change the default file on the daemon thread. |
Exceptions
This subroutine can throw the following exceptions:
- DaemonLost
- If the daemon object is lost (probably restarted), a DaemonLost exception is thrown. This exception will only be thrown in Sirius Mods Version 7.6 and later.
- IncorrectDaemonState
- If the daemon thread is asynchronous, an IncorrectDaemonState exception is thrown. This exception will only be thrown in Sirius Mods version 8.1 and later.
Usage notes
- Open cannot open a file or group that is not already open on the master thread. To open a file not open on the master thread, issue an OPEN command using the Run method.
- It is a request-cancelling error to use Open against a file or group that the issuing user does not have open.
- It is a (catchable) request-cancelling error if a group open fails because of an FTBL full condition.
Examples
These are all valid Open calls:
%daem:open('MYPROC') %daem:open('GROUP SIRSYS') %daem:open('PERM GROUP MUMBLE') %daem:open('FILE SIRLOCAL')