Feature suggestion to PointUnreachableException

This is where you talk about the NXJ software itself, installation issues, and programming talk.

Moderators: 99jonathan, roger, imaqine

Feature suggestion to PointUnreachableException

Postby positron96 » Fri Jun 29, 2012 12:02 pm

Hey there!
I'd like to make a feature suggestion: in 0.9.1 class PointUnreachableException has only 1 constructor without parameters. However it would be nice to have a constructor with string argument, like most other Exceptions do. This is probably a bug since the code of this class says:
Code: Select all
public class PointUnreachableException extends Exception {
   // Inherits everything from Exception
}

However, constructors are not inherited in java this way, they should be explicitly defined and use super(...) calls.
positron96
New User
 
Posts: 21
Joined: Fri Jun 29, 2012 11:55 am

Re: Feature suggestion to PointUnreachableException

Postby positron96 » Fri Jun 29, 2012 12:06 pm

I can even suggest an improved version. Don't know how to attach files here, so:
Code: Select all
package lejos.robotics.kinematics;

public class PointUnreachableException extends Exception {
   // Inherits everything from Exception

   public PointUnreachableException() {
      super();
   }
   
   public PointUnreachableException(String message) {
      super(message);
   }
   
   public PointUnreachableException(String message, Throwable cause) {
      super(message, cause);
   }
   
   public PointUnreachableException(Throwable cause) {
      super(cause);
   }
}
positron96
New User
 
Posts: 21
Joined: Fri Jun 29, 2012 11:55 am

Re: Feature suggestion to PointUnreachableException

Postby skoehler » Fri Jun 29, 2012 2:06 pm

Probably, somebody though constructors were inherited as well, which they aren't. However, it's fixed:
http://lejos.svn.sourceforge.net/viewvc ... threv=6732
skoehler
leJOS Team Member
 
Posts: 1448
Joined: Thu Oct 30, 2008 4:54 pm

Re: Feature suggestion to PointUnreachableException

Postby positron96 » Fri Jun 29, 2012 2:11 pm

This is great! Thanks for the reply!
positron96
New User
 
Posts: 21
Joined: Fri Jun 29, 2012 11:55 am


Return to NXJ Software

Who is online

Users browsing this forum: No registered users and 5 guests

more stuff