Your instructions, Isaiah, fixed the IJulia installation problem. It is 
working now! Thanks!

With your help I could get a step closer to a possible solution to my 
original problem: catching syntax errors.
~~~
err = nothing
rderr,wrerr = redirect_stderr()

@schedule begin
    global err
    while(true)
        err = readavailable(rderr)
    end
end
~~~
At this point I paste an expression into the Julia console. If it is valid, 
the err global variable stays empty. If there is any error, the err 
variable contains something, so I know there was an error. I have to set 
"err = nothing" again, and I can go on.

The only problem is that err contains a meaningless string. If I print out 
"readavailable(rderr)" it has good information about the error, but the 
assignment to a variable removes all readable text. Can I fix that? Like 
printing to a variable instead of a stream?

All these look terrible. There could be a few nice solutions, if Julia was 
modified a bit:
- A function or global variable, lastError, containing the description of 
the last error. It can be cleared manually, or automatically when a new 
user input is entered.
- A syntax error could be made catch-able in the eval() command
- STDERR could be made redirectable to a memory buffer or regular IOStrem 
or a pipe...


Reply via email to