MCPcopy Create free account
hub / github.com/OpenCCU/OpenCCU / _decoding_error

Function _decoding_error

buildroot-external/scripts/kconfiglib.py:6758–6777  ·  view source on GitHub ↗
(e, filename, macro_linenr=None)

Source from the content-addressed store, hash-verified

6756
6757
6758def _decoding_error(e, filename, macro_linenr=None):
6759 # Gives the filename and context for UnicodeDecodeError's, which are a pain
6760 # to debug otherwise. 'e' is the UnicodeDecodeError object.
6761 #
6762 # If the decoding error is for the output of a $(shell,...) command,
6763 # macro_linenr holds the line number where it was run (the exact line
6764 # number isn't available for decoding errors in files).
6765
6766 raise KconfigError(
6767 "\n"
6768 "Malformed {} in {}\n"
6769 "Context: {}\n"
6770 "Problematic data: {}\n"
6771 "Reason: {}".format(
6772 e.encoding,
6773 "'{}'".format(filename) if macro_linenr is None else
6774 "output from macro at {}:{}".format(filename, macro_linenr),
6775 e.object[max(e.start - 40, 0):e.end + 40],
6776 e.object[e.start:e.end],
6777 e.reason))
6778
6779
6780def _warn_verbose_deprecated(fn_name):

Callers 3

_initMethod · 0.85
load_configMethod · 0.85
_shell_fnFunction · 0.85

Calls 2

KconfigErrorClass · 0.85
maxFunction · 0.85

Tested by

no test coverage detected