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

Confusing error message when jubaclassifier get invalid configuration file #281

Closed
unnonouno opened this issue Mar 5, 2013 · 2 comments
Closed

Comments

@unnonouno
Copy link
Member

When a user misspelled "parameter" in jubaclassifier configuration, jubaclassifier returns this error.

Dynamic exception type: jubatus::jsonconfig::type_error::what: Object is expected, but Null is given. ()

This error mislead the user because path information is empty.

The reason of this phenomena is a little complicated.
The server can correctly read this configuration since parameter field in classifier_serv_config is optional.
https://github.com/jubatus/jubatus/blob/master/src/server/classifier_serv.cpp#L57
When a user misspelled it, the value of parameter is null and param variable is empty.
https://github.com/jubatus/jubatus/blob/master/src/server/classifier_serv.cpp#L110
So, the factory of classifier throws type_error with an empty path.
https://github.com/jubatus/jubatus/blob/master/src/classifier/classifier_factory.cpp#L46

I have two method to correct it.

  1. Change parameter field mandatory.
  2. Set default path to param local variable like this.
jsonconfig::config param(json(), ".parameter");  
@stale
Copy link

stale bot commented May 16, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label May 16, 2019
@stale
Copy link

stale bot commented Aug 15, 2019

Closing this issue after a prolonged period of inactivity. Please feel free to create a new issue or re-open it if you need.

@stale stale bot closed this as completed Aug 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants