lian / bitcoin-ruby

bitcoin utils and protocol in ruby.
Other
922 stars 322 forks source link

raise exceptions instead of returning NIL #288

Open yegor256 opened 5 years ago

yegor256 commented 5 years ago

May I suggest you raise exceptions instead of returning nil in, for example, script.rb? Those nils are just making things worse since later it's difficult to understand why attributes are nil. It's just a good practice to avoid nil in object-oriented programming. Thanks.