MCPcopy Create free account
hub / github.com/EmbeddedRPC/erpc / _decoding_error

Function _decoding_error

scripts/kconfig/kconfiglib.py:6834–6853  ·  view source on GitHub ↗
(e, filename, macro_linenr=None)

Source from the content-addressed store, hash-verified

6832
6833
6834def _decoding_error(e, filename, macro_linenr=None):
6835 # Gives the filename and context for UnicodeDecodeError's, which are a pain
6836 # to debug otherwise. 'e' is the UnicodeDecodeError object.
6837 #
6838 # If the decoding error is for the output of a $(shell,...) command,
6839 # macro_linenr holds the line number where it was run (the exact line
6840 # number isn't available for decoding errors in files).
6841
6842 raise KconfigError(
6843 "\n"
6844 "Malformed {} in {}\n"
6845 "Context: {}\n"
6846 "Problematic data: {}\n"
6847 "Reason: {}".format(
6848 e.encoding,
6849 "'{}'".format(filename) if macro_linenr is None else
6850 "output from macro at {}:{}".format(filename, macro_linenr),
6851 e.object[max(e.start - 40, 0):e.end + 40],
6852 e.object[e.start:e.end],
6853 e.reason))
6854
6855
6856def _warn_verbose_deprecated(fn_name):

Callers 3

_initMethod · 0.85
load_configMethod · 0.85
_shell_fnFunction · 0.85

Calls 1

KconfigErrorClass · 0.85

Tested by

no test coverage detected