From d499ee32bbd25c41e3127e00fc3927770e0a8819 Mon Sep 17 00:00:00 2001 From: Tommy Lillehagen Date: Fri, 6 Oct 2017 10:16:40 +0100 Subject: [PATCH] Correct bad exception reference and various rendering issues --- docs/source/tutorial-contract.rst | 6 +++--- docs/source/tutorial-test-dsl.rst | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/source/tutorial-contract.rst b/docs/source/tutorial-contract.rst index 11e6ef0755..8c48d33358 100644 --- a/docs/source/tutorial-contract.rst +++ b/docs/source/tutorial-contract.rst @@ -327,7 +327,7 @@ little odd: we have a *requireThat* construct that looks like it's built into th ordinary function provided by the platform's contract API. Kotlin supports the creation of *domain specific languages* through the intersection of several features of the language, and we use it here to support the natural listing of requirements. To see what it compiles down to, look at the Java version. Each ``"string" using (expression)`` statement -inside a ``requireThat`` turns into an assertion that the given expression is true, with an ``IllegalStateException`` +inside a ``requireThat`` turns into an assertion that the given expression is true, with an ``IllegalArgumentException`` being thrown that contains the string if not. It's just another way to write out a regular assertion, but with the English-language requirement being put front and center. @@ -340,8 +340,8 @@ the owner. 1. We still check there is a CP input state. 2. We want to see that the face value of the CP is being moved as a cash claim against some party, that is, the issuer of the CP is really paying back the face value. -2. The transaction must be happening after the maturity date. -3. The commercial paper must *not* be propagated by this transaction: it must be deleted, by the group having no +3. The transaction must be happening after the maturity date. +4. The commercial paper must *not* be propagated by this transaction: it must be deleted, by the group having no output state. This prevents the same CP being considered redeemable multiple times. To calculate how much cash is moving, we use the ``sumCashBy`` utility function. Again, this is an extension function, diff --git a/docs/source/tutorial-test-dsl.rst b/docs/source/tutorial-test-dsl.rst index 8bfbab79b0..b32be173c7 100644 --- a/docs/source/tutorial-test-dsl.rst +++ b/docs/source/tutorial-test-dsl.rst @@ -141,11 +141,11 @@ Let's take a look at a transaction that fails. :end-before: DOCEND 3 :dedent: 4 - .. literalinclude:: ../../docs/source/example-code/src/main/java/net/corda/docs/java/tutorial/testdsl/CommercialPaperTest.java -:language: java - :start-after: DOCSTART 3 - :end-before: DOCEND 3 - :dedent: 4 + .. literalinclude:: ../../docs/source/example-code/src/main/java/net/corda/docs/java/tutorial/testdsl/CommercialPaperTest.java + :language: java + :start-after: DOCSTART 3 + :end-before: DOCEND 3 + :dedent: 4 When run, that code produces the following error: @@ -297,4 +297,4 @@ verification (``this.fails()`` at the end). As in previous examples we can use ` :language: java :start-after: DOCSTART 10 :end-before: DOCEND 10 - :dedent: 4 \ No newline at end of file + :dedent: 4