ladisk / LDAQ

MIT License
24 stars 5 forks source link

Raise appropriate error #26

Closed TKosir closed 1 year ago

TKosir commented 1 year ago

When entering invalid string for a built in function, no Exception is raised. Instead the following error is obtained:

544 def update_line(self, new_data, plot_channel): 545 # only plot data that are within xlim (applies only for normal plot, not ch vs. ch) 546 t_span_samples = int(self.vis.subplot_options[plot_channel['pos']]['t_span'] * self.vis.acquisition.sample_rate) --> 548 nth = plot_channel['nth'] 550 xlim = self.vis.subplot_options[plot_channel['pos']]['xlim'] 552 if len(plot_channel['channels']) == 1: 553 # plot a single channel

KeyError: 'nth'