Return-Path: X-Original-To: apmail-systemml-dev-archive@minotaur.apache.org Delivered-To: apmail-systemml-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 424AD18A70 for ; Mon, 4 Apr 2016 21:38:27 +0000 (UTC) Received: (qmail 41543 invoked by uid 500); 4 Apr 2016 21:38:27 -0000 Delivered-To: apmail-systemml-dev-archive@systemml.apache.org Received: (qmail 41505 invoked by uid 500); 4 Apr 2016 21:38:26 -0000 Mailing-List: contact dev-help@systemml.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@systemml.incubator.apache.org Delivered-To: mailing list dev@systemml.incubator.apache.org Received: (qmail 41488 invoked by uid 99); 4 Apr 2016 21:38:26 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Apr 2016 21:38:26 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 32277180430 for ; Mon, 4 Apr 2016 21:38:26 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.179 X-Spam-Level: * X-Spam-Status: No, score=1.179 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id QlRYcHRj-79z for ; Mon, 4 Apr 2016 21:38:24 +0000 (UTC) Received: from mail-oi0-f52.google.com (mail-oi0-f52.google.com [209.85.218.52]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id C8A105F255 for ; Mon, 4 Apr 2016 21:38:23 +0000 (UTC) Received: by mail-oi0-f52.google.com with SMTP id p188so184438204oih.2 for ; Mon, 04 Apr 2016 14:38:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to; bh=xgvx33sPfmCevwCLxlLhaO8o0busus+VVKxtmVCvkIY=; b=hOSnJtx8+T+YRSsKUEv6qO9+vQ3IuGGMSKED3BLgn9Hv+uhQV9Kzwd2YXtIKiKiqjR 9XNCWfxrZxlV5FrUi+p/vWd3Z/sxy2HL9M5Lj9qktuw7KALFcqDC8xV8nX1485DOhDXc y1zefdY9WNKGMz6XBqeUyt/5U6Lu+jJ/WsWGN441QZP4K7KGpaUX/AmBeqUncmY88wWp Q5nTm+NVy+dLLs2gxtVtX9yXNLlPl5CCyKhQcYTc/eDjqmEYOvObpJDm7LEnDRB85ZV+ BUHn4tsxfs4EqeEBr6/c6J+qRC/AD6XfETI5B9gaZCN+nQa3vvtFONSOjh4UhfDtZFrv gnyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to; bh=xgvx33sPfmCevwCLxlLhaO8o0busus+VVKxtmVCvkIY=; b=E6l8opfqABo0lDiaLBPoVsVJ7ozPRsbZ3SgrelIAkWKTvNv1bTJMKKwm8OIi2qTUEl QKo9dM6XsLYkCmVidkY9wux5pzObjYstRbX0hg4Cewp3httJUThbGvjzgO6lweSd+Ljd 7uPw/kreFdhbqoMsXFbqouDvV2IGaabnzFrlJpEisulTgSyQWm9zMVulYbiI1MWRrlOV 4Z+dCqRoAs0igCe4nbJqOg6rAsv4qif01odrymSxne8rCRLWk1ixNMK7q9FbMZ01095y 6pOTdfFP3Nk3eCrRNSC+a1gfbVPngPfoTIMW/S44Ra7hbExr5Yw+YO+V/b2cetTJMR+m st9Q== X-Gm-Message-State: AD7BkJLbXY1l0FTydwVzF954AnWQIahQWQn2EmIwnzNFWNkOL30+et8CJira7v8mFVl/b5KoF0NT3zaNTa8W8g== MIME-Version: 1.0 X-Received: by 10.157.7.23 with SMTP id 23mr5471192ote.192.1459805902704; Mon, 04 Apr 2016 14:38:22 -0700 (PDT) Received: by 10.202.198.10 with HTTP; Mon, 4 Apr 2016 14:38:22 -0700 (PDT) In-Reply-To: <201604030434.u334YiEN024835@d01av04.pok.ibm.com> References: <201604030434.u334YiEN024835@d01av04.pok.ibm.com> Date: Mon, 4 Apr 2016 14:38:22 -0700 Message-ID: Subject: Re: Discussion SYSTEMML-593 MLContext Resign From: Deron Eriksson To: dev@systemml.incubator.apache.org Content-Type: multipart/alternative; boundary=001a1135de7e4596f7052faf8c4b --001a1135de7e4596f7052faf8c4b Content-Type: text/plain; charset=UTF-8 Hi Matthias, On Sat, Apr 2, 2016 at 9:34 PM, Matthias Boehm wrote: > > Also rather than introducing another exception class, couldn't we just > reuse DMLException by making it an uncaught exception? > Thank you for the feedback. My thoughts for creating an uncaught MLContextException center around a few issues: 1) The exception happens through the MLContext API, so to me the naming makes sense. 2) Placement of the new exception is in a org.apache.sysml.api.mlcontext package, along with all other primary classes that the user interacts with when using the MLContext API. This standardization is useful for things such as Javadocs (all API classes are under this single package) and code maintainability (all primary API classes are centralized in a single place). 3) This exception would handle errors that happen at the MLContext level and additionally be a wrapper for deeper levels of exceptions. 4) The naming of DMLException can be confusing to an end user. If a user runs PyDML and gets a DMLException, this is a little disconcerting. 5) It seems to me the cleanest least-invasive solution that gives the user the simplest experience is a new runtime exception. Given the interrelations of existing exception classes, almost all of which are actually caught exceptions, a new runtime exception avoids any retrofitting needed of existing exception handling. In the MLContext API, you just catch all existing caught exceptions and rethrow as MLContextExceptions, or generate new MLContextExceptions where appropriate. Throwable |-Exception |-DMLException (323 matches) |-AppException (not used) |-DMLDebuggerException (13 matches) |-DMLRuntimeException (3,689 matches) |-CacheException (82 matches) |-CacheIOException (26 matches) |-CacheStatusException (18 matches) |-DMLScriptException (39 matches) |-DMLUnsupportedOperationException (1,068 matches) |-HopsException (748 matches) |-LanguageException (390 matches) |-LopsException (596 matches) |-ParseException (320 matches) |-DMLParseException (50 matches) |-RuntimeException |-PackageRuntimeException (70 matches) Since there are already 15 existing exception classes, adding an additional exception class for a programmatic API doesn't seem to me to be an unnecessary proliferation of classes. Deron --001a1135de7e4596f7052faf8c4b--