IsStructuredError reports whether err is a GoSQLX *Error value. Use this to distinguish GoSQLX structured errors from generic Go errors before calling functions that require *Error (e.g., ExtractLocation). Example: if errors.IsStructuredError(err) { loc, _ := errors.ExtractLocation(err)
(err error)
| 329 | // // use loc for IDE diagnostics |
| 330 | // } |
| 331 | func IsStructuredError(err error) bool { |
| 332 | _, ok := err.(*Error) |
| 333 | return ok |
| 334 | } |
| 335 | |
| 336 | // ExtractLocation extracts the line/column location from a GoSQLX *Error. |
| 337 | // This is the preferred way to obtain location data for IDE integrations such as |
no outgoing calls