From 61f752a105912e3bbeed24d9e1ff39e4a310fed1 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Wed, 15 Apr 2009 00:28:07 +0000 Subject: [PATCH] Check the right things in our Preconditions. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5720 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- src/as/com/threerings/presents/util/SafeSubscriber.as | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/as/com/threerings/presents/util/SafeSubscriber.as b/src/as/com/threerings/presents/util/SafeSubscriber.as index 0b00a8878..729b241b4 100644 --- a/src/as/com/threerings/presents/util/SafeSubscriber.as +++ b/src/as/com/threerings/presents/util/SafeSubscriber.as @@ -50,8 +50,11 @@ public class SafeSubscriber implements Subscriber if (oid <= 0) { throw new ArgumentError("Invalid oid provided to safesub [oid=" + oid + "]"); } - if (subscriber == null) { - throw new ArgumentError("Null subscriber provided to safesub [oid=" + oid + "]"); + if (onAvailable == null) { + throw new ArgumentError("Null onAvailable provided to safesub [oid=" + oid + "]"); + } + if (onFailure == null) { + throw new ArgumentError("Null onFailure provided to safesub [oid=" + oid + "]"); } _oid = oid;