| 102 | { |
| 103 | public: |
| 104 | explicit FilePart(const wxFileName& fileName) |
| 105 | : mFileName(fileName) |
| 106 | { |
| 107 | if (!fileName.FileExists()) |
| 108 | { |
| 109 | throw SimpleMessageBoxException(ExceptionType::BadUserAction, |
| 110 | XO("Failed to open the file for upload: %s") |
| 111 | .Format(fileName.GetFullPath())); |
| 112 | } |
| 113 | |
| 114 | if (!mFile.Open(fileName.GetFullPath())) |
| 115 | { |
| 116 | throw SimpleMessageBoxException( |
| 117 | ExceptionType::BadUserAction, |
| 118 | XO("Failed to open the file for upload: %s") |
| 119 | .Format(fileName.GetFullPath())); |
| 120 | } |
| 121 | } |
| 122 | |
| 123 | int64_t GetSize() const override |
| 124 | { |
nothing calls this directly
no test coverage detected