Parameter validation & Juju

Katherine Cox-Buday katherine.cox-buday at canonical.com
Thu Jul 31 15:17:57 UTC 2014


Hey all,

What is the general consensus on parameter validation in Juju? As a general
practice, I always like to see code that validates parameters passed into
methods so that it fails fast, and gives future developers a contract to
work off of.

Just yesterday I experienced a nil-reference panic which occurred after a
lot of heavy operations. Parameter validation would have kicked me out much
higher in the stack and given me some indication of what was wrong.

Always interested in discussion :)

-
Katherine
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju-dev/attachments/20140731/d22326fa/attachment.html>


More information about the Juju-dev mailing list