java errors 37 and 3707

Mar 23, 2012 at 8:06am

java errors 37 and 3707

Hello,

I am a beginner with Java programming within Max.

The program below has only one method and does what expected, that is printing the incoming data in the Max window.

However any number coming into either inlet do also produces error messages like these:

com.cycling74.max.MaxRuntimeException
at com.cycling74.max.MaxObject.bail(MaxObject.java:3707)
at ecran_resistif1.inlet(ecran_resistif1.java:37)

What causes these error messages ?

Thank you in advance.

public void inlet(int i) {
if (getInlet() == 1) {
pos_y = i;
bail("pos_y = "+pos_y);
} else {
pos_x = i;
bail("pos_x = "+pos_x);
}

}

#62541
Mar 23, 2012 at 8:26am

If I replace the bail function with post, there’s no more error message.

However the bail method doesn’t come from nowhere. It’s in the official Java for Max .pdf tutorial (see p. 15)

#225893
Mar 23, 2012 at 8:51am

I believe bail() is to be called in the constructor only, if there is an error condition. post() should be used to print messages to the Max window.

#225894

You must be logged in to reply to this topic.