-
-
Notifications
You must be signed in to change notification settings - Fork 12
Max Leuthäuser edited this page Nov 18, 2021
·
5 revisions
This site collects some typical problems and pitfalls users of SCROLL might encounter.
SCROLL uses a custom equal
and hashCode
implementation for role-playing objects. If you are using Scala case classes make sure you understood their identity / comparison mechanism (see the official documentation).
The return type of role method calls is always Either[SCROLLError, E]
where E
is the return type of your role method. Understand how the Either type works.
You may want to check the return value explicitly:
val core = new Core()
new Compartment {
val someRole = new Role()
core play someRole
val result = +core someRoleMethod()
result match {
case Left(error) => handle(error)
case Right(returnValue) => // do something with it
}
}