Jump to content

Bricklet API suggestion


JavaLaurence

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 zu diesem Kommentar
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.

Gast
Reply to this topic...

×   Du hast formatierten Text eingefügt.   Formatierung jetzt entfernen

  Only 75 emoji are allowed.

×   Dein Link wurde automatisch eingebettet.   Einbetten rückgängig machen und als Link darstellen

×   Dein vorheriger Inhalt wurde wiederhergestellt.   Clear editor

×   Du kannst Bilder nicht direkt einfügen. Lade Bilder hoch oder lade sie von einer URL.

×
×
  • Neu erstellen...