vmware / vmware-aria-operations-integration-sdk

The VMware Aria Operations Integration SDK contains libraries, tools, and documentation for developing Management Packs for VMware Aria Operations. It is intended to make creating a Management Pack simple and fast, while allowing developers to use the language of their choice.
https://vmware.github.io/vmware-aria-operations-integration-sdk/
Apache License 2.0
13 stars 6 forks source link

com.vmware.aria.operations.time should stop the timer even if fn throws #361

Closed TrueFiskibility closed 2 weeks ago

TrueFiskibility commented 3 months ago

Describe the bug

If the fn passed to com.vmware.aria.operations.time throws an exception, the timer will not be stopped.

Reproduction steps

This will not stop the Login timer and it probably should. If the exception is caught higher up the stack, the timer will continue running which is not desirable.

time("Login") { throw RuntimeException("Invalid credentials") }

Expected behavior

If fn throws, the timer should be stopped.

Additional context

No response