danielmcclure / bitcoinj

Automatically exported from code.google.com/p/bitcoinj
Apache License 2.0
0 stars 1 forks source link

TransactionOutput.toString() probably shouldn't throw a RuntimeException #546

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When calling toString() on a non-vanilla TransactionOuput (e.g., one from a 
multi-signature transaction), a RuntimeException is thrown. This is probably 
bad practice for such a universal method.* For example, it's called implicitly 
all the time in Jython's interactive mode.

I've attached a test case, but it's likely overkill (the fix is probably to not 
throw any exceptions in the first place, but rather output some "raw" format).

* This is probably why its signature doesn't allow raising 
non-RuntimeExceptions in the first place.

Original issue reported on code.google.com by mbogos...@gmail.com on 17 Apr 2014 at 6:41

Attachments:

GoogleCodeExporter commented 9 years ago
This issue doesn't happen anymore. I have added test in this PR: 
https://github.com/bitcoinj/bitcoinj/pull/271

Original comment by wlangiew...@gmail.com on 10 Nov 2014 at 9:56