From: Renz Christian Bagaporo Date: Tue, 27 Nov 2018 01:45:21 +0000 (+0800) Subject: ldgen: add traceback in case of exception X-Git-Tag: v3.3-beta1~56^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=22b4c95d1ed2e2144d6e46a53c3d02c77ee38296;p=esp-idf ldgen: add traceback in case of exception --- diff --git a/tools/ldgen/ldgen.py b/tools/ldgen/ldgen.py index ca12fe8e87..25ce86e3c1 100755 --- a/tools/ldgen/ldgen.py +++ b/tools/ldgen/ldgen.py @@ -17,6 +17,8 @@ import argparse import os +import traceback +import sys from fragments import FragmentFileModel from sdkconfig import SDKConfig @@ -95,6 +97,9 @@ def main(): print("linker script generation failed for %s\nERROR: %s" % (input_file.name, e.message)) # Delete the file so the entire build will fail; and not use an outdated script. os.remove(output_file.name) + # Print traceback and exit + traceback.print_exc() + sys.exit(1) if __name__ == "__main__": main() \ No newline at end of file