Throw error when e vspace does not exist #5

Merged
Lephenixnoir merged 2 commits from Dr-Carlos/fxos:master into master 2022-04-18 12:07:26 +02:00
Collaborator

Hello!

In this commit I have fixed the vspace parameter (I didn't realise I needed to run parser.accept_options()), and e will now throw an error if the vspace passed in does not exist.

Hello! In this commit I have fixed the vspace parameter (I didn't realise I needed to run `parser.accept_options()`), and e will now throw an error if the vspace passed in does not exist.
Dr-Carlos added 1 commit 2022-04-16 00:26:03 +02:00
Owner

Thanks! This works well. However you shouldn't throw an error; to be honest exceptions have screwed me over in the past and I'm getting rid of them in fxos as much as possible. For instance right now if you try to autocomplete after e vspace=whatever, fxos crashes.

The parser being used for autocompletion means that you can't throw, only print. Also since I don't have value categories for options, this actually disables autocompletion of vspace names, which is unfortunate.

However, you have also fixed symbols being autocompleted from the wrong vspace, which is really cool!

Thanks! This works well. However you shouldn't throw an error; to be honest exceptions have screwed me over in the past and I'm getting rid of them in fxos as much as possible. For instance right now if you try to autocomplete after `e vspace=whatever`, fxos crashes. The parser being used for autocompletion means that you can't throw, only print. Also since I don't have value categories for options, this actually disables autocompletion of vspace names, which is unfortunate. However, you have also fixed symbols being autocompleted from the wrong vspace, which is really cool!
Dr-Carlos force-pushed master from 7ae47d6523 to 789fc3325c 2022-04-17 23:53:41 +02:00 Compare
Author
Collaborator

I have changed the throw to a FxOS_log at ERR level.

I have changed the throw to a FxOS_log at ERR level.
Owner

Great, I'll merge this and tune the parser a little bit afterwards.

Great, I'll merge this and tune the parser a little bit afterwards.
Lephenixnoir merged commit 707c154f00 into master 2022-04-18 12:07:26 +02:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Lephenixnoir/fxos#5
No description provided.