danielmewes / php-rql

A PHP client driver for the RethinkDB query language (ReQL).
http://php-rql.dnsalias.net/
339 stars 60 forks source link

Specific error codes for Exception messages #133

Open edgaraafelix opened 8 years ago

edgaraafelix commented 8 years ago

Is it possible to add specific error codes for RqlException, RqlServerError or RqlDriverError?

In some cases, this would make error checking much easier.

E.g.:

throw new RqlDriverError("Failed to encode document as JSON: " . json_last_error(), 001)

Note that the code 001 is only an example.