OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::Zipper::Impl Class Reference
Inheritance diagram for Slic3r::Zipper::Impl:
Collaboration diagram for Slic3r::Zipper::Impl:

Public Member Functions

std::string formatted_errorstr () const
SLIC3R_NORETURN void blow_up () const
bool is_alive ()
std::string get_errorstr () const
bool is_alive () const

Static Public Member Functions

static std::string get_errorstr (mz_zip_error mz_err)

Public Attributes

std::string m_zipname
mz_zip_archive arch

Detailed Description

Member Function Documentation

◆ blow_up()

SLIC3R_NORETURN void Slic3r::Zipper::Impl::blow_up ( ) const
inline
37 {
38 throw Slic3r::ExportError(formatted_errorstr());
39 }
std::string formatted_errorstr() const
Definition Zipper.cpp:30

References formatted_errorstr(), and SLIC3R_NORETURN.

Here is the call graph for this function:

◆ formatted_errorstr()

std::string Slic3r::Zipper::Impl::formatted_errorstr ( ) const
inline
31 {
32 return L("Error in zip archive") + " " + m_zipname + ": " +
34 }
#define L(s)
Definition ExtrusionEntity.cpp:25
std::string get_errorstr() const
Definition miniz_extension.hpp:30
std::string m_zipname
Definition Zipper.cpp:28

References Slic3r::MZ_Archive::get_errorstr(), L, and m_zipname.

Referenced by blow_up().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_errorstr() [1/2]

std::string Slic3r::MZ_Archive::get_errorstr ( ) const
inlineinherited
31 {
32 return get_errorstr(arch.m_last_error) + "!";
33 }
mz_zip_archive arch
Definition miniz_extension.hpp:24

References arch, and get_errorstr().

Referenced by Slic3r::extract_zip_to_directory(), Slic3r::Zipper::Impl::formatted_errorstr(), get_errorstr(), and Slic3r::read_wheel_plugin_metadata().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_errorstr() [2/2]

std::string Slic3r::MZ_Archive::get_errorstr ( mz_zip_error mz_err)
staticinherited
240{
241 switch (mz_err)
242 {
243 case MZ_ZIP_NO_ERROR:
244 return "no error";
245 case MZ_ZIP_UNDEFINED_ERROR:
246 return L("undefined error");
247 case MZ_ZIP_TOO_MANY_FILES:
248 return L("too many files");
249 case MZ_ZIP_FILE_TOO_LARGE:
250 return L("File too large");
251 case MZ_ZIP_UNSUPPORTED_METHOD:
252 return L("unsupported method");
253 case MZ_ZIP_UNSUPPORTED_ENCRYPTION:
254 return L("unsupported encryption");
255 case MZ_ZIP_UNSUPPORTED_FEATURE:
256 return L("unsupported feature");
257 case MZ_ZIP_FAILED_FINDING_CENTRAL_DIR:
258 return L("failed finding central directory");
259 case MZ_ZIP_NOT_AN_ARCHIVE:
260 return L("not a ZIP archive");
261 case MZ_ZIP_INVALID_HEADER_OR_CORRUPTED:
262 return L("invalid header or corrupted");
263 case MZ_ZIP_UNSUPPORTED_MULTIDISK:
264 return L("Saving to RAID is not supported.");
265 case MZ_ZIP_DECOMPRESSION_FAILED:
266 return L("decompression failed");
267 case MZ_ZIP_COMPRESSION_FAILED:
268 return L("compression failed");
269 case MZ_ZIP_UNEXPECTED_DECOMPRESSED_SIZE:
270 return L("unexpected decompressed size");
271 case MZ_ZIP_CRC_CHECK_FAILED:
272 return L("CRC check failed");
273 case MZ_ZIP_UNSUPPORTED_CDIR_SIZE:
274 return L("unsupported central directory size");
275 case MZ_ZIP_ALLOC_FAILED:
276 return L("allocation failed");
277 case MZ_ZIP_FILE_OPEN_FAILED:
278 return L("file open failed");
279 case MZ_ZIP_FILE_CREATE_FAILED:
280 return L("file create failed");
281 case MZ_ZIP_FILE_WRITE_FAILED:
282 return L("file write failed");
283 case MZ_ZIP_FILE_READ_FAILED:
284 return L("file read failed");
285 case MZ_ZIP_FILE_CLOSE_FAILED:
286 return L("file close failed");
287 case MZ_ZIP_FILE_SEEK_FAILED:
288 return L("file seek failed");
289 case MZ_ZIP_FILE_STAT_FAILED:
290 return L("file stat failed");
291 case MZ_ZIP_INVALID_PARAMETER:
292 return L("invalid parameter");
293 case MZ_ZIP_INVALID_FILENAME:
294 return L("invalid filename");
295 case MZ_ZIP_BUF_TOO_SMALL:
296 return L("Buffer too small");
297 case MZ_ZIP_INTERNAL_ERROR:
298 return L("internal error");
299 case MZ_ZIP_FILE_NOT_FOUND:
300 return L("file not found");
301 case MZ_ZIP_ARCHIVE_TOO_LARGE:
302 return L("Archive too large");
303 case MZ_ZIP_VALIDATION_FAILED:
304 return L("validation failed");
305 case MZ_ZIP_WRITE_CALLBACK_FAILED:
306 return L("write callback failed");
307 default:
308 break;
309 }
310
311 return L("unknown error");
312}

References L.

Referenced by Slic3r::anonymous_namespace{ZipperArchiveImport.cpp}::read_entry(), Slic3r::anonymous_namespace{SL1.cpp}::read_ini(), Slic3r::anonymous_namespace{ZipperArchiveImport.cpp}::read_ini(), and Slic3r::anonymous_namespace{SL1.cpp}::read_png().

Here is the caller graph for this function:

◆ is_alive() [1/2]

bool Slic3r::MZ_Archive::is_alive ( ) const
inlineinherited
36 {
37 return arch.m_zip_mode != MZ_ZIP_MODE_WRITING_HAS_BEEN_FINALIZED;
38 }

References arch.

◆ is_alive() [2/2]

bool Slic3r::Zipper::Impl::is_alive ( )
inline
42 {
43 return arch.m_zip_mode != MZ_ZIP_MODE_WRITING_HAS_BEEN_FINALIZED;
44 }

References Slic3r::MZ_Archive::arch.

Member Data Documentation

◆ arch

◆ m_zipname

std::string Slic3r::Zipper::Impl::m_zipname

Referenced by formatted_errorstr().


The documentation for this class was generated from the following file:
  • /home/runner/work/OrcaSlicer/OrcaSlicer/src/libslic3r/Zipper.cpp