Skip to content

Commit

Permalink
Attempt to show notification of library sync error (fixes #3848)
Browse files Browse the repository at this point in the history
  • Loading branch information
slideclimb committed Jan 28, 2025
1 parent 73826aa commit 308c6ef
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ abstract class RemoteBibLibrary(open val identifier: String, open val displayNam
companion object {

fun showNotification(project: Project, libraryName: String, statusMessage: String) {
val title = "Could not connect to $libraryName"
val title = "Something went wrong when retrieving library from $libraryName"
Notification("LaTeX", title, statusMessage, NotificationType.ERROR).notify(project)
}
}
Expand All @@ -33,7 +33,11 @@ abstract class RemoteBibLibrary(open val identifier: String, open val displayNam

// Reading the dummy bib file needs to happen in a place where we have read access.
runReadAction {
BibtexEntryListConverter().fromString(body)
try {
BibtexEntryListConverter().fromString(body)
} catch (e: Exception) {
raise(RemoteLibraryRequestFailure(displayName, body))
}
}
}

Expand Down

0 comments on commit 308c6ef

Please sign in to comment.