mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-15 18:58:00 -06:00
Handle read_from_file() exceptions in GUI. #1619
This commit is contained in:
parent
2d045d1f39
commit
e4c9171890
2 changed files with 9 additions and 3 deletions
|
@ -383,7 +383,10 @@ sub load_file {
|
|||
$process_dialog->Pulse;
|
||||
|
||||
local $SIG{__WARN__} = Slic3r::GUI::warning_catcher($self);
|
||||
my $model = Slic3r::Model->read_from_file($input_file);
|
||||
|
||||
my $model = eval { Slic3r::Model->read_from_file($input_file) };
|
||||
Slic3r::GUI::show_error($self, $@) if $@;
|
||||
|
||||
$self->load_model_object($_) for @{$model->objects};
|
||||
|
||||
$process_dialog->Destroy;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue