lib/make_menu.rb in make_menu-0.0.2 vs lib/make_menu.rb in make_menu-0.0.3
- old
+ new
@@ -17,16 +17,20 @@
require "./#{menu_name.downcase}_menu.rb"
Object.const_get("#{menu_name.capitalize}Menu").new(makefile).run
else
MakeMenu::Menu.new(makefile).run
end
+ rescue LoadError => _e
+ puts "ERROR! Expected file ./#{menu_name.downcase}_menu.rb to define class #{menu_name.capitalize}Menu < MakeMenu::Menu"
end
def self.status
if (menu_name = ENV.fetch('MENU', nil))
require "./#{menu_name.downcase}_status_panel.rb"
Object.const_get("#{menu_name.capitalize}StatusPanel").new.display
else
MakeMenu::StatusPanel.new.display
end
+ rescue LoadError => _e
+ puts "ERROR! Expected file ./#{menu_name.downcase}_status_panel.rb to define class #{menu_name.capitalize}StatusPanel < MakeMenu::StatusPanel"
end
end
\ No newline at end of file