Jump to content

Bricklet API suggestion


JavaLaurence
 Share

Recommended Posts

Currently, the TF implementation lets us instantiate a Bricklet object for a Bricklet which physically doesn't exist, either by passing a wrong UID, or by passing the "right" UID, but not having the Bricklet physically connected.

 

In either case, would it not be preferable to fail-early by having the constructor blow up with

 

throw new IllegalArgumentException("Bricklet not present: " + uid);

 

?

 

This suggestion does not require an API change, only an implementation change (and updated docs).

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...