3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-02-13 10:45:51 +00:00

Provide more opacity into exceptions.

This commit is contained in:
Matt Corallo 2013-03-30 22:54:29 -04:00
parent 939337b2db
commit 0ada33d2b1
2 changed files with 3 additions and 3 deletions

View File

@ -232,7 +232,7 @@ public class FullPrunedBlockChain extends AbstractBlockChain {
throw new RuntimeException(thrownE); // Shouldn't happen throw new RuntimeException(thrownE); // Shouldn't happen
} catch (ExecutionException thrownE) { } catch (ExecutionException thrownE) {
log.error("Script.correctlySpends threw a non-normal exception: " + thrownE.getCause()); log.error("Script.correctlySpends threw a non-normal exception: " + thrownE.getCause());
throw new VerificationException("Bug in Script.correctlySpends, likely script malformed in some new and interesting way."); throw new VerificationException("Bug in Script.correctlySpends, likely script malformed in some new and interesting way.", thrownE);
} }
if (e != null) if (e != null)
throw e; throw e;
@ -356,7 +356,7 @@ public class FullPrunedBlockChain extends AbstractBlockChain {
throw new RuntimeException(thrownE); // Shouldn't happen throw new RuntimeException(thrownE); // Shouldn't happen
} catch (ExecutionException thrownE) { } catch (ExecutionException thrownE) {
log.error("Script.correctlySpends threw a non-normal exception: " + thrownE.getCause()); log.error("Script.correctlySpends threw a non-normal exception: " + thrownE.getCause());
throw new VerificationException("Bug in Script.correctlySpends, likely script malformed in some new and interesting way."); throw new VerificationException("Bug in Script.correctlySpends, likely script malformed in some new and interesting way.", thrownE);
} }
if (e != null) if (e != null)
throw e; throw e;

View File

@ -83,7 +83,7 @@ public class FullPrunedBlockChainTest {
threw = true; threw = true;
if (!block.throwsException) { if (!block.throwsException) {
log.error("Block didn't match throws flag on block " + block.blockName); log.error("Block didn't match throws flag on block " + block.blockName);
fail(); throw e;
} }
if (block.connects) { if (block.connects) {
log.error("Block didn't match connects flag on block " + block.blockName); log.error("Block didn't match connects flag on block " + block.blockName);