Skip to content

Commit

Permalink
add error for invalid effects
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-smart committed Oct 31, 2024
1 parent df2adc2 commit 1072b11
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/effect/src/Micro.ts
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,9 @@ class FiberImpl<in out A = any, in out E = any> implements Fiber<A, E> {
}
}
} catch (error) {
if (!hasProperty(current, evaluate)) {
return exitDie(`Micro/Fiber.runLoop: Not a valid effect: ${String(current)}`)
}
return exitDie(error)
}
}
Expand Down

0 comments on commit 1072b11

Please sign in to comment.