File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
core/src/main/scala/sttp/monad Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ project/plugins/project/
17
17
.worksheet
18
18
19
19
.idea *
20
+ .vscode
20
21
21
22
.keys *
22
23
@@ -28,6 +29,6 @@ lowered.hnir
28
29
# Bloop / Metals
29
30
.bloop /
30
31
.metals /
31
- project / metals.sbt
32
+ metals.sbt
32
33
33
34
.bsp
Original file line number Diff line number Diff line change @@ -23,10 +23,10 @@ trait MonadError[F[_]] {
23
23
def error [T ](t : Throwable ): F [T ]
24
24
protected def handleWrappedError [T ](rt : F [T ])(h : PartialFunction [Throwable , F [T ]]): F [T ]
25
25
def handleError [T ](rt : => F [T ])(h : PartialFunction [Throwable , F [T ]]): F [T ] = {
26
- Try (rt) match {
27
- case Success (v) => handleWrappedError(v)(h)
28
- case Failure (e) if h.isDefinedAt(e) => h(e)
29
- case Failure (e) => error(e)
26
+ try handleWrappedError (rt)(h)
27
+ catch {
28
+ case e : Throwable if h.isDefinedAt(e) => h(e)
29
+ case e : Throwable => error(e)
30
30
}
31
31
}
32
32
You can’t perform that action at this time.
0 commit comments