By continuing the core static class I found out I had no choices to improve my template class with conditions to ensure that the CMS will not crash by it's fault.
The context variables passed to the error template were just key=>value with no array in value so I had to make a condition check in the template with the operator 'is'.
Now it works like a charm and support simple operator too : == != < > <= >=... you can even make a negation with the statement 'not' in front of the condition.