# test harness: Set filename on error return · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/5138856a72fc009ec799cb935d9117e3bd72f16a)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 5138856a72fc009ec799cb935d9117e3bd72f16a

Requested commit: 5138856a72fc009ec799cb935d9117e3bd72f16a

Commit: 5138856a72fc009ec799cb935d9117e3bd72f16a

Tree: fb4713ece697eebf87c57acde6c4bc50f6627471

Author: Luuk de Gram

Committer: Jakub Konka

## Message

```
test harness: Set filename on error return

While calling `next` an error can occur while parsing the file.
However, we don't set the filename that is currently being processed, until `next` completed successfully.
This means that for invalid test names, the wrong filename was being displayed in the panic message.
The fix is to retrieve the correct filename when an error occurs and then setting the filename appropriately.

```

## Parents

- [1bdcbd18ae1f312748c9909db98532a8dfd006eb](https://git.cafe/gitcafe/zig/commit/1bdcbd18ae1f312748c9909db98532a8dfd006eb?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/5138856a72fc009ec799cb935d9117e3bd72f16a?format=markdown)
