(&self, cpu: &mut icicle_vm::cpu::Cpu, msg: &str, code: u64)
| 148 | } |
| 149 | |
| 150 | fn error(&self, cpu: &mut icicle_vm::cpu::Cpu, msg: &str, code: u64) { |
| 151 | if let Some(output) = self.output.as_ref() { |
| 152 | let mut out = output.lock().unwrap(); |
| 153 | if self.colorize { |
| 154 | writeln!(out, "\n\x1b[0;31m[{}] {msg}\x1b[0m", cpu.icount()).unwrap(); |
| 155 | } |
| 156 | else { |
| 157 | out.write_all(msg.as_bytes()).unwrap() |
| 158 | } |
| 159 | } |
| 160 | |
| 161 | if self.canary { |
| 162 | cpu.exception = Exception::new(ExceptionCode::Environment, code); |
| 163 | } |
| 164 | } |
| 165 | } |
| 166 | |
| 167 | const fn binary_id(dataset_code: u64, binary_id: u8) -> u64 { |
no outgoing calls
no test coverage detected