Exception beep

This is where you talk about the NXJ hardware related topics such as the brick, sensors, LEGO pieces, etc.

Moderators: 99jonathan, roger, imaqine

Exception beep

Postby WillZaz » Thu Nov 19, 2009 11:09 am

Hi! Do you know if it's possible to disable those kind of "beep" that the NXT emits when throws a Java Exception??

It's not a big problem but I'd prefer that when my program crashes the robot doesn't emit any sound... :? And I wonder if it's possible or not...
WillZaz
New User
 
Posts: 9
Joined: Thu Oct 22, 2009 8:30 am
Location: Zaragoza (Aragon)

Postby gloomyandy » Thu Nov 19, 2009 11:46 am

Hi,
I assume you are not catching the exception? This means that the exception will be being caught by the default exception handler which is built into the firmware and because of this does not pickup the volume settings normally used by leJOS.

You can either catch the exception yourself (in your main function catch (Throwable t)), or you can link with the -g option (which enables the debug monitor code, so the default exception handler is now in Java) in which case the normal volume control settings will be used for the exception beep...

Or you could just fix your code so it doesn't throw an exception :lol:

Andy
User avatar
gloomyandy
leJOS Team Member
 
Posts: 3896
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Postby WillZaz » Thu Nov 19, 2009 1:35 pm

Thanks! Yes you're right, I'm not catching the exception :wink: ... Actually there's no problem with the code... the exception is thrown cause I have two bricks connected by Bluetooth and I close the connection unproperly...I mean switching off one of the bricks :lol:
WillZaz
New User
 
Posts: 9
Joined: Thu Oct 22, 2009 8:30 am
Location: Zaragoza (Aragon)


Return to NXJ Hardware

Who is online

Users browsing this forum: No registered users and 0 guests

more stuff