Skip to content

Commit cc44747

Browse files
authored
Merge pull request #5 from kraken-tech/better-error
Improve error message when Fluent file contains errors
2 parents c0b0741 + 995a5f0 commit cc44747

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/lib.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,11 @@ impl Bundle {
3434

3535
let res = match FluentResource::try_new(contents) {
3636
Ok(res) => res,
37-
Err(_) => return Err(PyValueError::new_err("Fluent file contains errors")),
37+
Err(error) => {
38+
return Err(PyValueError::new_err(format!(
39+
"{error:?} - Fluent file contains errors"
40+
)))
41+
}
3842
};
3943

4044
bundle.add_resource_overriding(res);

0 commit comments

Comments
 (0)