forked from onsails/wasmer-as
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
14118cc
commit 8ab6439
Showing
6 changed files
with
112 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
fn main() { | ||
} | ||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,9 @@ | ||
use super::{Env, StringPtr, Read}; | ||
use super::{Env, Read, StringPtr}; | ||
|
||
// if get_string throws an exception abort for some reason is being called | ||
pub fn abort( | ||
env: &Env, | ||
message: StringPtr, | ||
filename: StringPtr, | ||
line: i32, | ||
col: i32 | ||
) { | ||
pub fn abort(env: &Env, message: StringPtr, filename: StringPtr, line: i32, col: i32) { | ||
let memory = env.memory.get_ref().expect("initialized memory"); | ||
let message = message.read(memory).unwrap(); | ||
let filename = filename.read(memory).unwrap(); | ||
eprintln!("Error: {} at {}:{} col: {}", message, filename, line, col); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters