MCPcopy Create free account
hub / github.com/arktypeio/arktype / getLocationFromError

Function getLocationFromError

ark/fs/getCurrentLine.ts:198–206  ·  view source on GitHub ↗
(
	error: Error,
	offset: Offset = {
		immediate: true
	}
)

Source from the content-addressed store, hash-verified

196 * If no offset is provided, then the offset used will determine the first location information.
197 */
198const getLocationFromError = (
199 error: Error,
200 offset: Offset = {
201 immediate: true
202 }
203): Location => {
204 const locations = getLocationsFromError(error)
205 return getLocationWithOffset(locations, offset)
206}
207
208/**
209 * Get the location information about the line that called this method.

Callers 1

getCurrentLineFunction · 0.85

Calls 2

getLocationsFromErrorFunction · 0.85
getLocationWithOffsetFunction · 0.85

Tested by

no test coverage detected