@@ -471,7 +471,7 @@ class interactor_impl::internals
471
471
try
472
472
{
473
473
// XXX: Ignore the boolean return of triggerCommand,
474
- // error is already logged by triggerCommand
474
+ // error is already logged by triggerCommand
475
475
this ->Interactor .triggerCommand (commandWithArgs);
476
476
}
477
477
catch (const f3d::interactor::command_runtime_exception& ex)
@@ -538,7 +538,17 @@ class interactor_impl::internals
538
538
539
539
if (this ->CommandBuffer .has_value ())
540
540
{
541
- this ->Interactor .triggerCommand (this ->CommandBuffer .value ());
541
+ try
542
+ {
543
+ // XXX: Ignore the boolean return of triggerCommand,
544
+ // error is already logged by triggerCommand
545
+ this ->Interactor .triggerCommand (this ->CommandBuffer .value ());
546
+ }
547
+ catch (const f3d::interactor::command_runtime_exception& ex)
548
+ {
549
+ log ::error (" Interaction: error running command: \" " + this ->CommandBuffer .value () +
550
+ " \" : " + ex.what ());
551
+ }
542
552
this ->CommandBuffer .reset ();
543
553
}
544
554
@@ -622,8 +632,8 @@ interactor& interactor_impl::initCommands()
622
632
{
623
633
if (args.size () != expectedSize)
624
634
{
625
- throw interactor_impl ::invalid_args_exception (std::string (" Command: " ) +
626
- std::string (actionName) + " is expecting " + std::to_string (expectedSize) + " arguments" );
635
+ throw interactor ::invalid_args_exception (std::string (" Command: " ) + std::string (actionName ) +
636
+ " is expecting " + std::to_string (expectedSize) + " arguments" );
627
637
}
628
638
};
629
639
@@ -705,9 +715,8 @@ interactor& interactor_impl::initCommands()
705
715
}
706
716
else
707
717
{
708
- throw interactor_impl::invalid_args_exception (
709
- std::string (" Command: cycle_coloring arg:\" " ) + std::string (type) +
710
- " \" is not recognized." );
718
+ throw interactor::invalid_args_exception (std::string (" Command: cycle_coloring arg:\" " ) +
719
+ std::string (type) + " \" is not recognized." );
711
720
}
712
721
this ->Internals ->SynchronizeScivisOptions (this ->Internals ->Options , ren);
713
722
this ->Internals ->Window .PrintColoringDescription (log ::VerboseLevel::DEBUG);
@@ -782,7 +791,7 @@ interactor& interactor_impl::initCommands()
782
791
}
783
792
else
784
793
{
785
- throw interactor_impl ::invalid_args_exception (
794
+ throw interactor ::invalid_args_exception (
786
795
std::string (" Command: set_camera arg:\" " ) + std::string (type) + " \" is not recognized." );
787
796
}
788
797
});
@@ -819,8 +828,7 @@ interactor& interactor_impl::initCommands()
819
828
{
820
829
if (args.size () < 2 )
821
830
{
822
- throw interactor_impl::invalid_args_exception (
823
- " alias command requires at least 2 arguments" );
831
+ throw interactor::invalid_args_exception (" alias command requires at least 2 arguments" );
824
832
}
825
833
826
834
// Validate the alias arguments
@@ -932,7 +940,7 @@ bool interactor_impl::triggerCommand(std::string_view command)
932
940
log ::error (" Command: provided args in command: \" " , command,
933
941
" \" cannot be parsed into an option, ignoring" );
934
942
}
935
- catch (const invalid_args_exception& ex)
943
+ catch (const interactor:: invalid_args_exception& ex)
936
944
{
937
945
log ::error (ex.what (), " Ignoring." );
938
946
}
@@ -1371,10 +1379,4 @@ void interactor_impl::SetCommandBuffer(const char* command)
1371
1379
// XXX This replace previous command buffer, it should be improved
1372
1380
this ->Internals ->CommandBuffer = command;
1373
1381
}
1374
-
1375
- // ----------------------------------------------------------------------------
1376
- interactor_impl::invalid_args_exception::invalid_args_exception (const std::string& what)
1377
- : exception (what)
1378
- {
1379
- }
1380
1382
}
0 commit comments