Skip to content
Snippets Groups Projects
  • Lucas De Marchi's avatar
    0ad3b042
    waf: let wrapper exit with error · 0ad3b042
    Lucas De Marchi authored
    It's not useful to raise an excpetion because it will only report the
    command called exit with an error. Just return an error code instead of
    rasing an exception. This way we get nicer error messages:
    
        ./waf unknowncommand
        No function unknowncommand defined in /home/lucas/p/dronecode/ardupilot/wscript
    
    vs
    
        ./waf unknowncommand
        No function unknowncommand defined in /home/lucas/p/dronecode/ardupilot/wscript
        Traceback (most recent call last):
          File "./waf", line 15, in <module>
            raise e
        subprocess.CalledProcessError: Command '['python', '/home/lucas/p/dronecode/ardupilot/modules/waf/waf-light', 'unknowncommand']' returned non-zero exit status 1
    0ad3b042
    History
    waf: let wrapper exit with error
    Lucas De Marchi authored
    It's not useful to raise an excpetion because it will only report the
    command called exit with an error. Just return an error code instead of
    rasing an exception. This way we get nicer error messages:
    
        ./waf unknowncommand
        No function unknowncommand defined in /home/lucas/p/dronecode/ardupilot/wscript
    
    vs
    
        ./waf unknowncommand
        No function unknowncommand defined in /home/lucas/p/dronecode/ardupilot/wscript
        Traceback (most recent call last):
          File "./waf", line 15, in <module>
            raise e
        subprocess.CalledProcessError: Command '['python', '/home/lucas/p/dronecode/ardupilot/modules/waf/waf-light', 'unknowncommand']' returned non-zero exit status 1