5 Commits

Author SHA1 Message Date
Simon Podlipsky
4bc3b7885c
Fix CS in Error folder 2018-06-19 19:50:12 +02:00
Daniel Tschinder
15374a31dd New: printError()
Lifted from / inspired by a similar change in graphql/graphql-js#722, this creates a new function `printError()` (and uses it as the implementation for `GraphQLError#toString()`) which prints location information in the context of an error.

This is moved from the syntax error where it used to be hard-coded, so it may now be used to format validation errors, value coercion errors, or any other error which may be associated with a location.

ref: graphql/graphql-js

BREAKING CHANGE: The SyntaxError message does not contain the codeframe anymore and only the message, (string) $error will print the codeframe.
2018-02-12 12:23:39 +01:00
Vladimir Razuvaev
a1e06b2e61 Account for query offset in files for errors 2017-09-20 18:36:19 +07:00
Andreas Heiberg
80a662564e [style changes] arrays and callback 2016-11-16 17:29:50 +07:00
vladar
2675b65095 Moved all error-related classes to separate namespace; fixed related broken tests 2016-10-21 16:40:56 +07:00