From 579d4564eb3ab8c8302e98362f0c3888f05e6d9b Mon Sep 17 00:00:00 2001 From: Mark McCaskey Date: Wed, 29 Apr 2020 13:46:57 -0700 Subject: [PATCH] Update doc comment for `RuntimeError` --- lib/runtime-core/src/error.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/runtime-core/src/error.rs b/lib/runtime-core/src/error.rs index 512552433..fe0db1948 100644 --- a/lib/runtime-core/src/error.rs +++ b/lib/runtime-core/src/error.rs @@ -242,13 +242,12 @@ impl std::fmt::Display for InvokeError { } } -/// An `InternalError` is an error that happened inside of Wasmer and is a -/// catch-all for errors that would otherwise be returned as -/// `RuntimeError(Box::new())`. +/// A `RuntimeError` is an error that describes why the attempt to fully execute +/// some Wasm has failed. /// -/// This type provides greater visibility into the kinds of things that may fail -/// and improves the ability of users to handle them, though these errors may be -/// extremely rare and impossible to handle. +/// These reasons vary from the Wasm trapping or otherwise failing directly to user +/// controlled conditions such as metering running out of gas or a user host function +/// returning a custom error type directly. #[derive(Debug)] pub enum RuntimeError { /// An error relating to the invocation of a Wasm function.