Hi,
I’m writing a snippet which incorporates the following code:
$this->handle = @fsockopen($this->address, $this->port, $errno, $errstr, 1);
Now, if there is no answer on this socket I get an error when modx runs the snippet saying that:
[tt]« MODx Parse Error »
MODx encountered the following error while attempting to parse the requested resource:
« PHP Parse Error »
PHP error debug
Error: fsockopen(): unable to connect to localhost:5160[/tt]
However, I would like the snippet to output an error message of my choice, which it does, but because of the error it is never shown.
Is there another way of doing this in modx?
Regards
Jonas