(&self)
| 12 | |
| 13 | impl SignalFlags { |
| 14 | pub fn check_error(&self) -> Option<(i32, &'static str)> { |
| 15 | if self.contains(Self::SIGINT) { |
| 16 | Some((-2, "Killed, SIGINT=2")) |
| 17 | } else if self.contains(Self::SIGILL) { |
| 18 | Some((-4, "Illegal Instruction, SIGILL=4")) |
| 19 | } else if self.contains(Self::SIGABRT) { |
| 20 | Some((-6, "Aborted, SIGABRT=6")) |
| 21 | } else if self.contains(Self::SIGFPE) { |
| 22 | Some((-8, "Erroneous Arithmetic Operation, SIGFPE=8")) |
| 23 | } else if self.contains(Self::SIGSEGV) { |
| 24 | Some((-11, "Segmentation Fault, SIGSEGV=11")) |
| 25 | } else { |
| 26 | None |
| 27 | } |
| 28 | } |
| 29 | } |
no test coverage detected