How to copy Java error message from red error bar in Processing 3?

edited September 2017 in Using Processing

Say I have something like this:

scrproc3

How do I copy the error message in red (the Error on "VariableDeclarators") here?

Of course, here the error is trivial, but my actual use case is imported Java classes that are missing, and I'm not even getting the full error message written out... Also, it would be great to be able to copy and paste the error text elsewhere.

I've tried the obvious - holding the mouse pointer over the red area and hitting Ctrl-C, nothing happens...

Thanks in advance for your help!

Tagged:

Answers

  • edited September 2017 Answer ✓

    That 1 is a compilation error. They're much more succinct than runtime errors. :(|)
    I don't think they can be copied outta the PDE (Processing's IDE). But at least they're generally small. ;;)

  • edited September 2017

    Thanks @GoToLoop,

    I don't think they can be copied outta the PDE (Processing's IDE).

    Oh, damn it - really?

    Nobody from the Processing devs' ever thought, that I might not really want to type something like: "The type com.google.api.client.googleapis.services.json.AbstractGoogleJsonClient$Builder cannot be resolved. It is indirectly referenced from required .class files" if I want to paste it somewhere? I mean, why do we have computers, and the concept of copy/paste at all?! :)

    Can I at least start up Processing in some way, so it dumps all these messages to stdout - then I can copy/paste them from a terminal?

  • @sdaau -- This sounds like copy-paste from the bar might be a reasonable feature request for Processing Issues:

    https://github.com/processing/processing/issues

    ...although I would strongly suggest being polite when explaining your use case to the volunteers who maintain and develop this software for free.

  • Also, if you use the menu Tools > Install processing-java, then you could run your sketch from the command line:

    mkdir Test
    touch Test/Test.pde
    cat > Test/Test.pde <<< "blabla"
    processing-java --sketch=`pwd`/Test --run
    

    Which will generate an error:

    Test.pde:1:2:1:2: unexpected token: blabla
    

    ...although it isn't the same error you are showing in your screenshot.

  • Hi @jeremydouglass ,

    Thanks for the responses!

    ... then you could run your sketch from the command line: ...

    Indeed - thanks a lot for this tip!

    ...although it isn't the same error you are showing in your screenshot.

    Indeed - at first I thought differing Processing versions maybe - but I repeated your command line experiment, and I got exactly the same results as you (that is, command line reports unexpected token: blahblaha, vs. the red top bar in GUI reporting Error on "VariableDeclarators")..

    However, I tested this with some of my code that gave the long error messages (the "The type com.google.api...." one), and here they are verbatim spit out! So at least the command line is a handy workaround...

    This sounds like copy-paste from the bar might be a reasonable feature request for Processing Issues

    Yes - done: Allow Java error messages in Processing red top bar to be copy/pasted · Issue #5271 · processing/processing

    ... although I would strongly suggest being polite when explaining your use case to the volunteers who maintain and develop this software for free.

    Yeah, sorry about that, I was just trying to be sarcastic, not insulting :)

    The thing is, I wrote this post after 5-6 times trying to deal with this, and the first couple of times I told myself "nevermind there's no copy-paste, I'll just type this error down, I don't really expect this error to be here once I'm done" - but then, after my expectations failed, and I kept being served by similar errors, I just got frustrated ... Hope the tone of my feature request is acceptable now :)

    Thanks again, guys!

  • edited September 2017

    Yeah, sorry about that, I was just trying to be sarcastic, not insulting.

    @jeremydouglass was referring about the GitHub Processing devs, not us. :-j

  • Yes, I definitely understand your frustration -- I was just suggesting to reel it in on the Github issue. And the issue looks great -- thanks so much for submitting it! I am not a Processing core dev, but hopefully it will get traction.

Sign In or Register to comment.