codeplant / simple-navigation

A ruby gem for creating navigations (with multiple levels) for your Rails, Sinatra or Padrino applications. Render your navigation as html list, link list or breadcrumbs.
http://simple-navigation-demo.codeplant.ch/
MIT License
885 stars 136 forks source link

make stack traces for errors in configs more usable #209

Closed SKoschnicke closed 1 year ago

SKoschnicke commented 6 years ago

When there is an error in the navigation config, the stack trace won't include a pointer to the actual config file and line but only something like

(eval):5:in `block in eval_config'

This change supplies the path to the config file to instance_eval so that the stack trace now include path and line where the error occurs.

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-0.2%) to 99.446% when pulling 5c3590763796de524e444474c3e8641d2b502103 on SKoschnicke:fix_stack_traces into 3df3a88fd65645eba1d9fd8dcfd59804e9f6232c on codeplant:master.

SKoschnicke commented 6 years ago

CI ftw! I will fix that...

SKoschnicke commented 6 years ago

Okay, I need some help with that. Is it a good idea to just make the config_file method public?