-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ports the basic deflate and related items from prusa3d/PrusaSlicer fo…
…r AMF deflate. Implements #4511
- Loading branch information
1 parent
18ddd3a
commit 61b6cb1
Showing
12 changed files
with
10,011 additions
and
4,924 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#ifndef _libslic3r_Exception_h_ | ||
#define _libslic3r_Exception_h_ | ||
|
||
#include <stdexcept> | ||
|
||
namespace Slic3r { | ||
|
||
// PrusaSlicer's own exception hierarchy is derived from std::runtime_error. | ||
// Base for Slicer's own exceptions. | ||
class Exception : public std::runtime_error { using std::runtime_error::runtime_error; }; | ||
#define SLIC3R_DERIVE_EXCEPTION(DERIVED_EXCEPTION, PARENT_EXCEPTION) \ | ||
class DERIVED_EXCEPTION : public PARENT_EXCEPTION { using PARENT_EXCEPTION::PARENT_EXCEPTION; } | ||
// Critical exception produced by Slicer, such exception shall never propagate up to the UI thread. | ||
// If that happens, an ugly fat message box with an ugly fat exclamation mark is displayed. | ||
SLIC3R_DERIVE_EXCEPTION(CriticalException, Exception); | ||
SLIC3R_DERIVE_EXCEPTION(RuntimeError, CriticalException); | ||
SLIC3R_DERIVE_EXCEPTION(LogicError, CriticalException); | ||
SLIC3R_DERIVE_EXCEPTION(InvalidArgument, LogicError); | ||
SLIC3R_DERIVE_EXCEPTION(OutOfRange, LogicError); | ||
SLIC3R_DERIVE_EXCEPTION(IOError, CriticalException); | ||
SLIC3R_DERIVE_EXCEPTION(FileIOError, IOError); | ||
SLIC3R_DERIVE_EXCEPTION(HostNetworkError, IOError); | ||
SLIC3R_DERIVE_EXCEPTION(ExportError, CriticalException); | ||
SLIC3R_DERIVE_EXCEPTION(PlaceholderParserError, RuntimeError); | ||
// Runtime exception produced by Slicer. Such exception cancels the slicing process and it shall be shown in notifications. | ||
SLIC3R_DERIVE_EXCEPTION(SlicingError, Exception); | ||
#undef SLIC3R_DERIVE_EXCEPTION | ||
|
||
} // namespace Slic3r | ||
|
||
#endif // _libslic3r_Exception_h_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.