Generic error now accepts arguments by const reference.
Enumerate for error code.
Some tests has been written.