Skip to content
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.

Commit

Permalink
Bug 1875891 - Adding MalformedInputException to catch list of handleP…
Browse files Browse the repository at this point in the history
…lacesExceptions.
  • Loading branch information
Amejia481 authored and mergify[bot] committed Jan 24, 2024
1 parent 3872fae commit d10752f
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import mozilla.components.concept.sync.SyncableStore
import mozilla.components.support.base.log.logger.Logger
import mozilla.components.support.base.utils.NamedThreadFactory
import mozilla.components.support.utils.logElapsedTime
import java.nio.charset.MalformedInputException
import java.util.concurrent.Executors

/**
Expand Down Expand Up @@ -145,6 +146,9 @@ abstract class PlacesStorage(
protected inline fun handlePlacesExceptions(operation: String, block: () -> Unit) {
try {
block()
} catch (e: MalformedInputException) {
crashReporter?.submitCaughtException(e)
logger.debug("Ignoring invalid invalid non utf-8 character when running $operation", e)
} catch (e: PlacesApiException.OperationInterrupted) {
logger.debug("Ignoring expected OperationInterrupted exception when running $operation", e)
} catch (e: PlacesApiException.UrlParseFailed) {
Expand Down

0 comments on commit d10752f

Please sign in to comment.