Green-Software-Foundation / if

Impact Framework
https://if.greensoftware.foundation/
MIT License
134 stars 37 forks source link

Exhaust error is not handled #698

Closed MariamKhalatova closed 1 month ago

MariamKhalatova commented 1 month ago

Description of the Error

On the branch dump-logs-error, exhaust error is not handled with current catch mechanism.

Screenshot 2024-05-06 at 1 35 45 AM

Expected Behaviour

Exhaust error to be handled by catch block. Logger should mark it as an error, and print it in red.

Actual Behaviour

The process exits with thrown error.

Steps to Reproduce

  1. Setup the manifest from below.
  2. Run manifest with following command:
    npm run ie -- --manifest /Users/mariamkhalatova/Projects/UK/if/manifests/examples/basic.yml --output

Link to online environment

Manifest File That Generated the Error

name: basic
description: a minimal manifest executing a single plugin on a single component for a single timestep
tags:
initialize:
  outputs: ['yaml']
  plugins:
    teads-curve: 
      path: '@grnsft/if-unofficial-plugins'
      method: TeadsCurve
      global-config:
        interpolation: spline
tree:
  children:
    child-0:
      defaults:
        cpu/thermal-design-power: 100
      pipeline:
        - teads-curve
      inputs:
        - timestamp: 2023-07-06T00:00
          duration: 1
          cpu/utilization: 20
        - timestamp: 2023-07-06T00:01
          duration: 1
          cpu/utilization: 80
        - timestamp: 2023-07-06T00:02
          duration: 1
          cpu/utilization: 20

Links to Any Additional Code

npm run ie -- --manifest /Users/mariamkhalatova/Projects/UK/if/manifests/examples/basic.yml --output

Runtime Info

macOS, Node 18

MariamKhalatova commented 1 month ago

592

MariamKhalatova commented 1 month ago

fixed by #691