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

Translator crashes when supplied reader doesn't exist. #10

Closed
jlblcc opened this issue Dec 3, 2014 · 7 comments
Closed

Translator crashes when supplied reader doesn't exist. #10

jlblcc opened this issue Dec 3, 2014 · 7 comments

Comments

@jlblcc
Copy link
Member

jlblcc commented Dec 3, 2014

Is this expected behavior, or should we provide a more useful error message?

The error output is:

TypeError: no implicit conversion of nil into String
    .../Projects/ADIwg/adiwgTranslator/mdTranslator/lib/adiwg/mdtranslator.rb:93:in `+'
    .../Projects/ADIwg/adiwgTranslator/mdTranslator/lib/adiwg/mdtranslator.rb:93:in `reader_module'
@stansmith907
Copy link
Contributor

Fixed.

But I did make some changes to the response object. I changed 'readerNameRequested' and 'readerName' to 'readerRequested' and 'readerFound'. I also set 'writerPass' to false if no writer was specified. Messages were added to both reader and write for 'Reader/Writer name is missing or not supported'.

@jlblcc
Copy link
Member Author

jlblcc commented Dec 4, 2014

@stansmith907 Shouldn't the messages always be an array? They're returning a string, at least for single errors.

@stansmith907
Copy link
Contributor

Yes. Let me see what I did.

@stansmith907
Copy link
Contributor

Fixed and pushed as version 0.10.1. Maybe we need to write some test scripts!

@jlblcc
Copy link
Member Author

jlblcc commented Dec 4, 2014

Yeah, I actually was adding a simple test for 19110 when I found the problem.

@stansmith907
Copy link
Contributor

OK, I'll try your 1 a week idea.

@stansmith907
Copy link
Contributor

Patched mdTranslator to catch missing and nil reader and writer names.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants