(&mut self, err: wasmer::RuntimeError, context: &str)
| 995 | } |
| 996 | |
| 997 | fn startup_failure(&mut self, err: wasmer::RuntimeError, context: &str) -> Result<()> { |
| 998 | if let Some(output) = self.take_startup_output_after_failure() { |
| 999 | if protocol_response_contains_error(&output) { |
| 1000 | return Err(StartupErrorResponse::new(output).into()); |
| 1001 | } |
| 1002 | return Err(err).context(format!( |
| 1003 | "{context}{}", |
| 1004 | self.startup_failure_detail(Some(&output)) |
| 1005 | )); |
| 1006 | } |
| 1007 | Err(err).context(format!("{context}{}", self.startup_failure_detail(None))) |
| 1008 | } |
| 1009 | |
| 1010 | fn take_startup_output_after_failure(&mut self) -> Option<Vec<u8>> { |
| 1011 | let _ = self.protocol.pq_flush.call(&mut self.store); |
no test coverage detected