From issues-return-164305-archive-asf-public=cust-asf.ponee.io@hive.apache.org Wed Jul 31 12:45:02 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 25B5418062B for ; Wed, 31 Jul 2019 14:45:02 +0200 (CEST) Received: (qmail 39007 invoked by uid 500); 31 Jul 2019 12:45:01 -0000 Mailing-List: contact issues-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list issues@hive.apache.org Received: (qmail 38998 invoked by uid 99); 31 Jul 2019 12:45:01 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 Jul 2019 12:45:01 +0000 Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id C3C86E2F8C for ; Wed, 31 Jul 2019 12:45:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 5FD2B2663E for ; Wed, 31 Jul 2019 12:45:00 +0000 (UTC) Date: Wed, 31 Jul 2019 12:45:00 +0000 (UTC) From: "Peter Vary (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-22060) Replacing "catch Throwable" with a more restricted exception class MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HIVE-22060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16897132#comment-16897132 ] Peter Vary commented on HIVE-22060: ----------------------------------- [~isuller]: If done like this, I am sold on this idea :) > Replacing "catch Throwable" with a more restricted exception class > ------------------------------------------------------------------ > > Key: HIVE-22060 > URL: https://issues.apache.org/jira/browse/HIVE-22060 > Project: Hive > Issue Type: Improvement > Components: Hive > Reporter: Ivan Suller > Assignee: Ivan Suller > Priority: Major > > Catching Throwable considered unsafe in Java. A Throwable can be any Error and those are JVM errors after the state of the JVM is not guaranteed thus the cleanest way to "handle" the error is to let it kill the current thread. > I ran a quick scan and found almost 400 "catch Throwable" in the current codebase. I opened this ticket as a conversation starter to: > - discuss if we want to eliminate this issue > - if we want to do it what's the best way to do it -- This message was sent by Atlassian JIRA (v7.6.14#76016)