I think better approach would be just to return the status and possible error string:
Code: Select all
success, error$ = OpenConnection(1, "hostname", 2000)
Code: Select all
success, error$ = OpenConnection(1, "hostname", 2000)
Code: Select all
ExitOnError(False)
OpenConnection(1, ...)
error = GetLastError()
ExitOnError(True)
Code: Select all
Function base:CloseWindow(window)
ExitOnError(False)
CloseWindow(window)
ExitOnError(True)
EndFunction