fiduswriter / biblatex-csl-converter

A set of JavaScript converters: bib(la)tex => json, json => csl, and json => biblatex
GNU Lesser General Public License v3.0
34 stars 10 forks source link

Error in entry key stops parsing all further entries #2

Closed retorquere closed 7 years ago

retorquere commented 7 years ago

I have in my test files one entry the looks like this

@Article{Dobrovol'skii_1963,
  Title                    = {Use of the {H}all current for investigation of carrier scattering in semiconductors},
  Author                   = {Dobrovol'skii, V. N. and Gritsenko, Yu. I.},
  Journal                  = {Soviet Physics - Solid State},
  Year                     = {1963},
  Note                     = {Original paper in Russian: Fizika Tverdogo Tela, 4 (1962), pp. 2760--2769},
  Pages                    = {2025--2031},
  Volume                   = {4},

  Comment                  = {SBB},
  File                     = {Dobrovol'skii_1963.pdf:CopperOxides\\Dobrovol'skii_1963.pdf:PDF},
  Owner                    = {Francesco},
  Timestamp                = {2009.04.14}
}

Clearly broken, but it stops parsing the whole file, which makes it harder or provide feedback.

retorquere commented 7 years ago

(or I assume it does, the parser spits out everything that follows -- which is a lot in this file -- to the console)

johanneswilm commented 7 years ago

The output is now in an error message that the client app can deal with as it sees fit. I don't know how much sense it makes to try to process more of the file if one entry is broken, as that entry will likely have to be fixed anyway, and then import is restarted.

retorquere commented 7 years ago

The problem for me is that I can't talk to the user. I've usually generated a note as part of the import that explained the probable location of the error. I can throw an error, but Zotero will just say "an error has occurred".

johanneswilm commented 7 years ago

I see. So you prefer importing everything you can.

What are the chances of Zotero allowing better feedback? What would the process for that be? If I were the user, I would get quite frustrated if it A) Imports only half of my sources and doesn't tell me why, or B) skips some sources and doesn't tell me why.

retorquere commented 7 years ago

I don't speak for them in any formal capacity, but my guess would be "pretty slim". Import is seen strictly as a migration mechanism as far as I can tell. But exporters have the same problem.

Yes, frustrating, which is one of the reasons I built in an automated error reporting facility. The user gets a cryptic error and the way to the logs is not very user friendly.

johanneswilm commented 7 years ago

Tested: It does not stop the import of other entries in the current version. Only the affected entry is not imported.