Uploaded image for project: 'GMAT'
  1. GMAT
  2. GMT-5325

Unsupported Python types need to throw exceptions

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: P1
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: R2015a
    • Component/s: Python
    • Labels:
      None

      Description

      These 4 test scripts provide error messages from Python, rather than trapping the bad input before making the call:

      CallPythonFunction_Validation_InvalidInputs_Resource_Propagator.script
      CallPythonFunction_Validation_InvalidInputs_Resource_Spacecraft.script
      CallPythonFunction_Validation_InvalidOutputs_Resource_Propagator.script
      CallPythonFunction_Validation_InvalidOutputs_Resource_Spacecraft.script

      Here is the error message:

      Command Exception: Error in the CallPython command execution:
      Interface Exception Thrown: Python Exception: <class 'TypeError'>: passthrough() missing 1 required positional argument: 'inData'
      

      The issue here is that the unsupported input type should throw, but instead just continues. Similar behavior is seen for outputs. Both throw exceptions, but they come from inside of Python when we should have trapped them before making the Python call.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: