Skip to content

Conversation

aolieman
Copy link

An unexpected exit without any clues of what went wrong can be confusing for users. It lead me down quite the rabbit hole (or should we say K-hole) earlier today.

That's what can happen easily now in _exec_test. Expected errors are caught and lead to a clean exit, but no clues appear other than the exit code. This PR prints the error message before exiting. The messages I've come across are clear enough and actionable for the user.

Without the print, the output of a test with problems looks like:

ℹ️  Build Summary:
   Wasm File: /tmp/tmpqakbgvopkomet_komet-sink-carbon/test_sink_carbon.wasm
   Wasm Hash: bcb6cc78ec7b62e989ec9e5eeba7d75d6f27576c0624c281a8794505c3a31732
   Exported Functions: 4 found
     • _
     • init
     • test_active
     • test_swap_is_atomic
✅ Build Complete
Processing contract: test_sink_carbon

This change adds, e.g.:

Unsupported SC value type: 'string'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant