Skip to content
This repository has been archived by the owner on Apr 8, 2020. It is now read-only.

Assert fails to run #77

Open
DanielRX opened this issue Sep 9, 2019 · 3 comments
Open

Assert fails to run #77

DanielRX opened this issue Sep 9, 2019 · 3 comments

Comments

@DanielRX
Copy link
Contributor

DanielRX commented Sep 9, 2019

Using assert in contracts leads to

Quering call/contractName/tester failed: wasm execution failed with error: WasmerCallError("Smart contract has explicitly invoked `panic`.").

Expected:The Error message is visible in the RPC return

@janedegtiareva
Copy link
Contributor

Do you mind adding a code snippet to repro?

@DanielRX
Copy link
Contributor Author

DanielRX commented Sep 13, 2019

From the chat:

export function tester(): void {
  assert(false, "Error");
}

fails (without returning the "Error" string) when you call it as a view function

@bowenwang1996
Copy link
Contributor

It's an issue with nearlib. @vgrichina will look into it.

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

No branches or pull requests

3 participants