Where are error messages handled in the PDE source code

I am working on an art project that uses error messages as a form of creative practice. I am hoping to edit the part of the PDE that catches exceptions and throws the error message to the PDE console and actually execute other programs as well/instead.

Could anyone point me to where exceptions are caught and thrown in the source code?

Also any advice on the need/ or how to compile the code or if I just need to edit and save would be greatly appreciated as I have only ever worked with developing sketches in Processing.

Answers

  • Errors are all written to a file in the disk too, might be easier just to parse this file.

    Operating system?

  • Thanks koogs. My operating system is OSX 10.11.3

  • don't know about osx. try running locate hs_err from the command line.

    i find files like

    /opt64/processing-3.0b7/hs_err_pid8709.log
    /opt64/processing-3.0b7/hs_err_pid8806.log
    /opt64/processing-3.0b7/hs_err_pid8890.log
    /opt64/processing-3.0b7/hs_err_pid8959.log
    /opt64/processing-3.0b7/hs_err_pid9025.log
    

    where /opt/64/processing-3.0b7 is my processing base directory (and which don't appear to get tidied up). but there are also files in my /tmp directory

    160814_0583.err <- stderr
    160814_0583.out <- stdout
    

    (which do)

    also in my tmp directory, in randomly named directories, are the intermediate .java file and the .class files that are created EVERY TIME i compile.

  • edited August 2016

    I need to activate the locate command by installing a database. I'll do that and come back.

    But can I just clarify, will this process find the code that executes the error message or the error message log? I was a bit confused with your first comment about parsing.I am wanting to edit the code so when I perform an error in processing, another program is executed.

  • This is just the log file.

  • What I was hoping to do is locate the code in the processing files that executes the error messages. From there I am hoping to execute some other code.

    An arbitrary example being every time you write an error in Processing a message is sent to an arduino that has a robotic arm that slaps you in the face.

    So I am assuming I need to write a program where the errors are getting handled. And I am assuming there is a file in the Processing package that contains that code.

  • Couldn't just handle exception errors with try-catch blocks? I can see this feature to be useful when ppl try to divide by zero.

    Kf

  • Hi kfrajer unfortunately it is important for the work to use the code that handles 'non-executable' code. So was hoping to edit the PDE files.

  • every time you write an error

    So every time the realtime syntax parser shows you an error, say?

    (As opposed to syntax errors that are shown when you hit run or runtime errors like null pointer exceptions)

    I think you'll have a very red face if you do this because it's always complaining about missing brackets and such just because you haven't finished typing the line you're on.

  • edited August 2016

    That might be a little too slap happy. What i should have said is every time you hit run.

    So Im looking for where the sytax errors are handled when run is hit and runtime errors.

    Any help locating those files would be great.

Sign In or Register to comment.