| 60 | namespace { |
| 61 | |
| 62 | void handleIPSError(IPSError error) { |
| 63 | TaskManager::doLater([error]{ |
| 64 | switch (error) { |
| 65 | case IPSError::InvalidPatchHeader: |
| 66 | ui::ToastError::open("hex.builtin.menu.file.export.ips.popup.invalid_patch_header_error"_lang); |
| 67 | break; |
| 68 | case IPSError::AddressOutOfRange: |
| 69 | ui::ToastError::open("hex.builtin.menu.file.export.ips.popup.address_out_of_range_error"_lang); |
| 70 | break; |
| 71 | case IPSError::PatchTooLarge: |
| 72 | ui::ToastError::open("hex.builtin.menu.file.export.ips.popup.patch_too_large_error"_lang); |
| 73 | break; |
| 74 | case IPSError::InvalidPatchFormat: |
| 75 | ui::ToastError::open("hex.builtin.menu.file.export.ips.popup.invalid_patch_format_error"_lang); |
| 76 | break; |
| 77 | case IPSError::MissingEOF: |
| 78 | ui::ToastError::open("hex.builtin.menu.file.export.ips.popup.missing_eof_error"_lang); |
| 79 | break; |
| 80 | } |
| 81 | }); |
| 82 | } |
| 83 | |
| 84 | } |
| 85 |
no outgoing calls
no test coverage detected