mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-14 13:02:39 -07:00
Refactored Print::validate() method to not throw an exception, but
to return a string with an error message instead. This was necessary to avoid a hang-up on some Strawberry Perl distributions, when a perl "croak" function is called after a C++ exception is caught.
This commit is contained in:
@@ -450,4 +450,13 @@ sub expanded_output_filepath {
|
||||
return $self->placeholder_parser->process($path);
|
||||
}
|
||||
|
||||
# Wrapper around the C++ Slic3r::Print::validate()
|
||||
# to produce a Perl exception without a hang-up on some Strawberry perls.
|
||||
sub validate
|
||||
{
|
||||
my $self = shift;
|
||||
my $err = $self->_validate;
|
||||
die $err . "\n" if (defined($err) && $err ne '');
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
Reference in New Issue
Block a user