exercism / exercism/nim-test-runner

improve error message for call depth limit

Open
#85 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Nim
Stars
2
Forks
5
Avg merge
10d 1h
Merged PRs (30d)
1

Description

Reported by @axtens in Slack:

> Crashed the nim runner with the following code in Reverse String

>```Nim
>import sequtils, strutils
>
>var seq_reverse: proc( str: seq[char]): seq[char]
>
>seq_reverse = proc( str: seq[char]): seq[char] =
> if str.len == 1:
> str[0..0]
> else:
> var slice = str
> slice.delete(0,0)
> #let revved = reverse(slice)
> concat(seq_reverse(slice), str[0..0])
>
>proc reverse*(str: string): string =
> cast[string](seq_reverse(toSeq(str)))
>
>echo reverse("dog")
>```

> Worked fine in Nim Playground, see https://play.nim-lang.org/#ix=3s0y

---

The error:

```
parsejson.nim(522) raiseParseErr
Error: unhandled exception: /mnt/exercism-iteration/results.json(1, 0) Error: { expected [JsonParsingError]
```

The website produces the message:

> An error occurred while running your tests. This might mean that there was an issue in our infrastructure, or it might mean that you have something in your code that's causing our systems to break.
>
> Please check your code, and if nothing seems to be wrong, try running the tests again.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.