Skip to content
This repository has been archived by the owner on Dec 27, 2022. It is now read-only.

dat API: writeFile encoding option is not optional #237

Closed
marcelklehr opened this issue Dec 31, 2016 · 6 comments
Closed

dat API: writeFile encoding option is not optional #237

marcelklehr opened this issue Dec 31, 2016 · 6 comments

Comments

@marcelklehr
Copy link

Operation System: Ubuntu 16.04
Beaker Version: 8c32d5c

I tried to dat.writeFile without specifying an encoding and got an exception. I assumed utf8 (or anything else, really) would be the default encoding due to the ? in the method signature in the docs. I might have been assuming wrong, though :)

@pfrazee
Copy link
Member

pfrazee commented Dec 31, 2016

You're assumption is right, it should be optional. What exception did you get?

@marcelklehr
Copy link
Author

A WriteFileError, I think. The error message was an empty string.

@pfrazee
Copy link
Member

pfrazee commented Dec 31, 2016

Can you confirm that was the error? A WriteFileError is an unexpected internal issue. If you run Beaker from the CLI, you should see a more descriptive error in the console if that occurs.

@pfrazee
Copy link
Member

pfrazee commented Dec 31, 2016

Also what was your usage of the method?

@marcelklehr
Copy link
Author

marcelklehr commented Dec 31, 2016

Ah, the CLI log was helpful. I had a trailing slash in the filename... My bad, sorry for the noise :)

@pfrazee
Copy link
Member

pfrazee commented Dec 31, 2016 via email

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

No branches or pull requests

2 participants