Compilation fails when is_compilation_successful is set to false as returned by the run API endpoint. In the case of compilation failure, the message "Runtime error:" should not be printed to the console. Instead, the log messages contained within the logs array returned by the run API endpoint should be displayed.
Here is an example of a program that does not compile:
fn main() -> felt252 {
let n = 2 + 3
n
}
When is_compilation_successful is true, but is_execution_successful is false, the system should correctly print a runtime error. This behavior is currently working as intended and should not be changed.
An example of a program with a runtime error:
// provide '0' as argument
fn main(a: u8) -> u8 {
1 / a
}
Compilation fails when
is_compilation_successful
is set to false as returned by therun
API endpoint. In the case of compilation failure, the message "Runtime error:" should not be printed to the console. Instead, the log messages contained within the logs array returned by therun
API endpoint should be displayed.Here is an example of a program that does not compile:
When
is_compilation_successful
is true, butis_execution_successful
is false, the system should correctly print a runtime error. This behavior is currently working as intended and should not be changed.An example of a program with a runtime error: