On 01/02/2017 10:19, Viktor Klang wrote:
Try(block).fold(Status.Success(_), Status.Failure(_))
Neat, I wasn't aware of that - it appeared in 2.12:
https://issues.scala-lang.org/browse/SI-8336
Ta :-)
--
Alan Burlison
--
--
Read the docs: http://akka.io/docs/
Check the FAQ:
On Wed, Feb 1, 2017 at 10:51 AM, Alan Burlison
wrote:
> On 01/02/17 09:06, Viktor Klang wrote:
>
> You're welcome. A reminder that the actual error messages are very
>> important to include. :)
>>
>
> Yes, I consider my wrist to be slapped ;-) Thanks again!
lol, no
On 01/02/17 09:06, Viktor Klang wrote:
You're welcome. A reminder that the actual error messages are very
important to include. :)
Yes, I consider my wrist to be slapped ;-) Thanks again!
If there is no method in the java/scaladoc then you'll need to convert
manually.
If there is I
On Wed, Feb 1, 2017 at 2:55 AM, Alan Burlison
wrote:
> Ahah! I think you may of nailed it... Thanks!
>>
>
> Indeed you did nail it - "thanks" doesn't come close as I'd looked at this
> for so long that I'd gone completely snow-blind ;-)
>
You're welcome. A reminder that
Ahah! I think you may of nailed it... Thanks!
Indeed you did nail it - "thanks" doesn't come close as I'd looked at
this for so long that I'd gone completely snow-blind ;-)
Is there a convenient shorthand way of mapping between a
scala.util.Success and an akka.actor.Status.Success, or
On 31/01/17 23:34, Viktor Klang wrote:
I think the problem is that your responding with a scala.util.Success
rather than a akka.actor.Status.Success.
Ahah! I think you may of nailed it... Thanks!
--
Alan Burlison
--
--
Read the docs: http://akka.io/docs/
Check the FAQ:
I think the problem is that your responding with a scala.util.Success
rather than a akka.actor.Status.Success.
On Wed, Feb 1, 2017 at 12:20 AM, Alan Burlison
wrote:
> On 31/01/17 22:18, Viktor Klang wrote:
>
> The answer will be in the stack traces.
>>
>
> What I got
On 31/01/17 22:18, Viktor Klang wrote:
The answer will be in the stack traces.
What I got was:
java.lang.ClassCastException: Cannot cast scala.util.Success to
scala.runtime.BoxedUnit
which didn't give me much of a clue, however it was clear that
asInstanceOf wasn't the right approach and
The answer will be in the stack traces.
--
Cheers,
√
On Jan 31, 2017 10:55 PM, "Akka Team" wrote:
> If it in fact was a Unit you got back from the actor then neither of the
> things you tried should throw a class cast exception though. If the actor
> for example sends
If it in fact was a Unit you got back from the actor then neither of the
things you tried should throw a class cast exception though. If the actor
for example sends a Future[Unit] back, then you will have a
Future[Future[Unit]] returned from ask.
--
Johan
Akka Team
On Tue, Jan 31, 2017 at 2:41
On 31/01/2017 20:32, Akka Team wrote:
You have a Future[Something], and a Something is an Any (everything is) but
it is not Unit (only Unit is), so you can not just cast it, you must
replace it with an actual Unit, which is what .map(_ => ()) does.
OK, thanks for confirming that I haven't
You have a Future[Something], and a Something is an Any (everything is) but
it is not Unit (only Unit is), so you can not just cast it, you must
replace it with an actual Unit, which is what .map(_ => ()) does.
--
Johan
Akka Team
On Tue, Jan 31, 2017 at 11:35 AM, Alan Burlison
I'm writing an Akka persistence journal that saves data in JSON format.
I've done that as normal, by subclassing AsyncWriteJournal and
implementing the necessary methods.
The actual file IO is done by sub-Actors, one per output file where each
persistent actor has its own JSON file. The
13 matches
Mail list logo