Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong storage plugins might lead to very poor error messages #2753

Open
markus2330 opened this issue Jun 6, 2019 · 4 comments

Comments

Projects
None yet
2 participants
@markus2330
Copy link
Contributor

commented Jun 6, 2019

Steps to Reproduce the Problem

I accidentally mounted a quickdump file as dump file:

kdb mount `pwd`/file.qd /tests # quickdump
kdb ls /tests

I think something like this can easily happen, it is a rather typical error. (Especially as long as "dump" is default).

Expected Result

That I get a nice error message that this is maybe a wrong file format. Ideally it should even say that a solution might be to remount the file with a different plugin.

Actual Result

Sorry, module dump issued the error 49:
unknown command detected in dumpfile: EKDB

System Information

  • Elektra Version: master

@Piankero Piankero referenced this issue Jun 9, 2019

Open

Error codes implementation #2686

6 of 9 tasks complete
@Piankero

This comment has been minimized.

Copy link
Contributor

commented Jun 10, 2019

I changed the error message as following:
https://github.com/Piankero/libelektra/blob/1984018672a0fc0ca62ffbfd73213025fd4289ce/src/plugins/dump/dump.cpp#L191-L195

If you think this is enough feel free to close the ticket

@markus2330

This comment has been minimized.

Copy link
Contributor Author

commented Jun 10, 2019

Yes, the text is okay but I keep it open as these needs to be changed again when the SOLUTION macro exists.

To give "dump" as example does not make sense: dump is the plugin that failed.

@Piankero

This comment has been minimized.

Copy link
Contributor

commented Jun 10, 2019

If the user mounts with ini but it is a dump file then probably this is the correct format.

@markus2330

This comment has been minimized.

Copy link
Contributor Author

commented Jun 10, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.