Skip to content
This repository has been archived by the owner on Mar 11, 2023. It is now read-only.

Handle stream errors - change proposal #244

Open
papirosko opened this issue Aug 9, 2019 · 2 comments
Open

Handle stream errors - change proposal #244

papirosko opened this issue Aug 9, 2019 · 2 comments

Comments

@papirosko
Copy link

This is not an error handling:

  def filterStatuses(follow: Seq[Long] = Seq.empty,
   ...
         errorHandler: PartialFunction[Throwable, Unit] = ErrorHandler.ignore
   ...


object ErrorHandler {
  def ignore: PartialFunction[Throwable, Unit] = {
    case scala.util.control.NonFatal(e) => ()
  }
}

make it at least:

object ErrorHandler {
  val log: Logger = ... 
  def ignore: PartialFunction[Throwable, Unit] = {
    case scala.util.control.NonFatal(e) => log.warn("Error", e)
  }
}
@DanielaSfregola
Copy link
Owner

Hi @papirosko,
thanks for the suggestion! Yes, I like your proposal: could you send us a PR?

Thanks,
Daniela

@DanielaSfregola DanielaSfregola changed the title Handle stream errors Handle stream errors - change proposal Aug 9, 2019
@papirosko
Copy link
Author

#245

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