Commit Graph

4 Commits

Author SHA1 Message Date
Manuel Aráoz 01b74b8df5 Merge pull request #695 from eordano/feature/errors
Add a preconditions module, and refactor errors
2014-12-10 12:35:31 -03:00
Esteban Ordano ea17a6ace1 Add a preconditions module, and refactor errors
100% code coverage for the preconditions module.

Usage:
```
$.checkState(something === anotherthing, 'Expected something to be
anotherthing');
$.checkArgument(something < 100, 'something', 'must be less than 100');
$.checkArgumentType(something, PrivateKey, 'something'); // The third
argument is a helper to mention the name of the argument
$.checkArgumentType(something, PrivateKey); // but it's optional (will
show up as "(unknown argument)")
```
2014-12-10 11:56:38 -03:00
Esteban Ordano 3551742fee Miscelaneus updates to docs and bufferreader/writer 2014-12-09 17:31:20 -03:00
Esteban Ordano a2a51ecc0c Fix style: move each static function to an appropiate namespace 2014-11-30 09:47:44 -03:00