How to retrieve error details inside the on-error clause

When using the on-error clause for a /tool fetch command (or other) is it possible to get the actual error message or number ?

There must be some info available because when failing in the terminal there usually is a message saying what went wrong.
For example:
[admin@router] > /tool fetch url=htt://bad.protocol.com
failure: invalid URL protocol

The question is how can I get this message inside the on-error clause.

As far as I have seen you can use on-error for two things.

  1. Prevent script from stop running if there are one or more error.
  2. Run an alternate code if some error occurs.

I have not seen any possibility to get the actual error listed.
That would be nice to have, so if MT reads this, please add.

THE CORRECT WAY IS SANITIZE THE STRING FIRST…

for example:

:if ($theurlstring~"^(http|https|ftp|sftp|tftp)://") do={
    # something
} else={
    # do nothing
}

then you can use this example to intercept fetch errors:
http://forum.mikrotik.com/t/fetch-capable-of-following-redirects/151723/1

The question is about getting the on-error detailed info.
The bad URL is just an example that generates an error.

As far as I know this is not possible.
MikroTik knows about this and they consider implementing, but that has not yet happened.