# Exit codes

To indicate if a program ran successfully or had problem, exit codes are used.

<mark style="color:yellow;">Exit codes are the numeric values which tells the operating system that the executable ran successfully or not.</mark>

SRON's interpreter returns these exit codes:

* <mark style="color:yellow;">0</mark>: code ran successfully with no errors and exceptions.
* <mark style="color:yellow;">1</mark>: code ran into errors caused by logical issues.
* <mark style="color:yellow;">2</mark>: code tries to access a memory which it doesn't own.
* <mark style="color:yellow;">3</mark>: Your system has no memory left.
* <mark style="color:yellow;">4</mark>: code raises an exception thrown by std::exception of C++.
* <mark style="color:yellow;">5</mark>: Your source code is calling **throwException()** function.
* <mark style="color:yellow;">6</mark>: code exited due to stack overflow(mostly due to deep recursions).
* <mark style="color:yellow;">7</mark>: code terminated due to `SIGINT` signal (Ctrl+C).
* <mark style="color:yellow;">8</mark>: code terminated due to `SIGKILL` signal (kill \<pid>).
* <mark style="color:yellow;">9</mark>: code terminated due to `SIGBREAK` signal(Ctrl+Enter).
* <mark style="color:yellow;">10</mark>: code terminated due to `SIGTERM` signal(Shutdown).
* <mark style="color:yellow;">11</mark>: code terminated due to `SIGABRT` signal(Abort).
* <mark style="color:yellow;">12</mark>: code terminated due to `SIGSEGV` signal(Segmentation Fault).
* <mark style="color:yellow;">13</mark>: code terminated due to unknown signal(or the signal not handled by SRON's interpreter).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sron.gitbook.io/docs/exit-codes.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
