MCPcopy Index your code
hub / github.com/clips/pattern / errmsg

Function errmsg

pattern/web/json/decoder.py:67–79  ·  view source on GitHub ↗
(msg, doc, pos, end=None)

Source from the content-addressed store, hash-verified

65
66
67def errmsg(msg, doc, pos, end=None):
68 # Note that this function is called from _speedups
69 lineno, colno = linecol(doc, pos)
70 if end is None:
71 #fmt = '{0}: line {1} column {2} (char {3})'
72 #return fmt.format(msg, lineno, colno, pos)
73 fmt = '%s: line %d column %d (char %d)'
74 return fmt % (msg, lineno, colno, pos)
75 endlineno, endcolno = linecol(doc, end)
76 #fmt = '{0}: line {1} column {2} - line {3} column {4} (char {5} - {6})'
77 #return fmt.format(msg, lineno, colno, endlineno, endcolno, pos, end)
78 fmt = '%s: line %d column %d - line %d column %d (char %d - %d)'
79 return fmt % (msg, lineno, colno, endlineno, endcolno, pos, end)
80
81
82_CONSTANTS = {

Callers 1

__init__Method · 0.85

Calls 1

linecolFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…