Verbose about menu commands and guard about name (#422)
This commit is contained in:
@@ -26,7 +26,7 @@ module SpeckleConnector3
|
||||
_run(*parameters)
|
||||
end
|
||||
rescue StandardError => e
|
||||
action = Actions::HandleError.new(e, @binding.name, @action, parameters)
|
||||
action = Actions::HandleError.new(e, @binding.nil? ? "unknown binding" : @binding.name, @action, parameters)
|
||||
app.update_state!(action)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -9,6 +9,8 @@ module SpeckleConnector3
|
||||
# @return [UI::Command] the command that can be added to Sketchup menu or toolbar
|
||||
def self.sketchup_command(command, menu_text)
|
||||
UI::Command.new(menu_text) do
|
||||
puts '### COMMAND CALLED BY MENU ###'
|
||||
puts "Name: #{menu_text}"
|
||||
command.run
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user