Skip to content

Commit 602e7ef

Browse files
committed
fix(docs): fix bad links to exception tests
1 parent e62a919 commit 602e7ef

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/writing_tests/exception_tests.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ Exception tests are a special type of test which verify that an invalid transact
66

77
To test for an exception, the test can use either of the following types from `ethereum_test_exceptions` library:
88

9-
1. [`TransactionException`](../running_tests/test_formats/exceptions.md#transactionexception): To be added to the `error` field of the `Transaction` object, and to the `exception` field of the `Block` object that includes the transaction; this exception type is used when a transaction is invalid, and therefore when included in a block, the block is expected to be invalid too. This is different from valid transactions where an exception during EVM execution is expected (e.g. a revert, or out-of-gas), which can be included in valid blocks.
9+
1. [`TransactionException`](../library/ethereum_test_exceptions.md#ethereum_test_exceptions.TransactionException): To be added to the `error` field of the `Transaction` object, and to the `exception` field of the `Block` object that includes the transaction; this exception type is used when a transaction is invalid, and therefore when included in a block, the block is expected to be invalid too. This is different from valid transactions where an exception during EVM execution is expected (e.g. a revert, or out-of-gas), which can be included in valid blocks.
1010

1111
For an example, see [`eip3860_initcode.test_initcode.test_contract_creating_tx`](../tests/shanghai/eip3860_initcode/test_initcode/test_contract_creating_tx.md) which raises `TransactionException.INITCODE_SIZE_EXCEEDED` in the case that the initcode size exceeds the maximum allowed size.
1212

13-
2. [`BlockException`](../running_tests/test_formats/exceptions.md#blockexception): To be added to the `exception` field of the `Block` object; this exception type is used when a block is expected to be invalid, but the exception is related to a block property, e.g. an invalid value of the block header.
13+
2. [`BlockException`](../library/ethereum_test_exceptions.md#ethereum_test_exceptions.BlockException): To be added to the `exception` field of the `Block` object; this exception type is used when a block is expected to be invalid, but the exception is related to a block property, e.g. an invalid value of the block header.
1414

1515
For an example, see [`eip4844_blobs.test_excess_blob_gas.test_invalid_static_excess_blob_gas`](../tests/cancun/eip4844_blobs/test_excess_blob_gas/test_invalid_static_excess_blob_gas.md) which raises `BlockException.INCORRECT_EXCESS_BLOB_GAS` in the case that the `excessBlobGas` remains unchanged
1616
but the parent blobs included are not `TARGET_BLOBS_PER_BLOCK`.
@@ -19,7 +19,7 @@ Although exceptions can be combined with the `|` operator to indicate that a tes
1919

2020
## Adding a new exception
2121

22-
If a test requires a new exception, because none of the existing ones is suitable for the test, a new exception can be added to either [`TransactionException`](../running_tests/test_formats/exceptions.md#transactionexception) or [`BlockException`](../running_tests/test_formats/exceptions.md#blockexception) classes.
22+
If a test requires a new exception, because none of the existing ones is suitable for the test, a new exception can be added to either [`TransactionException`](../library/ethereum_test_exceptions.md#ethereum_test_exceptions.TransactionException) or [`BlockException`](../library/ethereum_test_exceptions.md#ethereum_test_exceptions.BlockException) classes.
2323

2424
The new exception should be added as a new enum value, and the docstring of the attribute should be a string that describes the exception.
2525

0 commit comments

Comments
 (0)