Extension structure · Question 9 of 12
An extension throws throw new \InvalidArgumentException('Unknown mode', ...). Which second parameter follows the TYPO3 convention?
1 answer is correct. Medium
Show answer
Answer
- C A unique code taken from the Unix timestamp when the line was written, e.g. 1727349820
Explanation
In the TYPO3 Core every exception carries its own integer code, the Unix timestamp of the moment the line was written, e.g. 1527778767 in the DateTimeAspect. The code shows up in error messages and logs, so the throwing location can be found with a single search, and it can be searched for on the web. A string is not allowed as a code in PHP, and HTTP status codes would not be unique.