[jira] [Commented] (FLINK-2395) Check Scala catch blocks for Throwable

2017-09-13 Thread Till Rohrmann (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-2395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16165290#comment-16165290
 ] 

Till Rohrmann commented on FLINK-2395:
--

I think this issue can be closed since we are removing the Scala components 
anyway quite soon.

> Check Scala catch blocks for Throwable
> --
>
> Key: FLINK-2395
> URL: https://issues.apache.org/jira/browse/FLINK-2395
> Project: Flink
>  Issue Type: Improvement
>  Components: Build System, Scala API
>Reporter: Till Rohrmann
>Priority: Minor
>
> As described in [1], it's not a good practice to catch {{Throwables}} in 
> Scala catch blocks because Scala uses some special exceptions for the control 
> flow. Therefore we should check whether we can restrict ourselves to only 
> catching subtypes of {{Throwable}}, such as {{Exception}}, instead.
> [1] 
> https://www.sumologic.com/2014/05/05/why-you-should-never-catch-throwable-in-scala/



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (FLINK-2395) Check Scala catch blocks for Throwable

2017-09-11 Thread mingleizhang (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-2395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16162401#comment-16162401
 ] 

mingleizhang commented on FLINK-2395:
-

The link was broken. 404 error.

> Check Scala catch blocks for Throwable
> --
>
> Key: FLINK-2395
> URL: https://issues.apache.org/jira/browse/FLINK-2395
> Project: Flink
>  Issue Type: Improvement
>  Components: Build System, Scala API
>Reporter: Till Rohrmann
>Priority: Minor
>
> As described in [1], it's not a good practice to catch {{Throwables}} in 
> Scala catch blocks because Scala uses some special exceptions for the control 
> flow. Therefore we should check whether we can restrict ourselves to only 
> catching subtypes of {{Throwable}}, such as {{Exception}}, instead.
> [1] 
> https://www.sumologic.com/2014/05/05/why-you-should-never-catch-throwable-in-scala/



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (FLINK-2395) Check Scala catch blocks for Throwable

2015-07-23 Thread Maximilian Michels (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-2395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14638609#comment-14638609
 ] 

Maximilian Michels commented on FLINK-2395:
---

On the master, we currently have 72 {{Throwable}} catch blocks in the Scala 
code. Probably most of them can be safely converted to catch {{Exception}} 
instead. Some corner cases may remain, e.g. Hadoop uses {{FSError}} subclassed 
from Throwable to signalize file system errors but that should be handled by 
Java code. Then of course there are virtual machine errors like 
{{OutOfMemoryError}}.

> Check Scala catch blocks for Throwable
> --
>
> Key: FLINK-2395
> URL: https://issues.apache.org/jira/browse/FLINK-2395
> Project: Flink
>  Issue Type: Improvement
>Reporter: Till Rohrmann
>Priority: Minor
>
> As described in [1], it's not a good practice to catch {{Throwables}} in 
> Scala catch blocks because Scala uses some special exceptions for the control 
> flow. Therefore we should check whether we can restrict ourselves to only 
> catching subtypes of {{Throwable}}, such as {{Exception}}, instead.
> [1] 
> https://www.sumologic.com/2014/05/05/why-you-should-never-catch-throwable-in-scala/



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLINK-2395) Check Scala catch blocks for Throwable

2015-07-23 Thread Stephan Ewen (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-2395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14638608#comment-14638608
 ] 

Stephan Ewen commented on FLINK-2395:
-

At some points, catch {{Throwable}} is probably okay, such as at root points in 
the JobManager / TaskManager process initialization.

> Check Scala catch blocks for Throwable
> --
>
> Key: FLINK-2395
> URL: https://issues.apache.org/jira/browse/FLINK-2395
> Project: Flink
>  Issue Type: Improvement
>Reporter: Till Rohrmann
>Priority: Minor
>
> As described in [1], it's not a good practice to catch {{Throwables}} in 
> Scala catch blocks because Scala uses some special exceptions for the control 
> flow. Therefore we should check whether we can restrict ourselves to only 
> catching subtypes of {{Throwable}}, such as {{Exception}}, instead.
> [1] 
> https://www.sumologic.com/2014/05/05/why-you-should-never-catch-throwable-in-scala/



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLINK-2395) Check Scala catch blocks for Throwable

2015-07-23 Thread Ufuk Celebi (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-2395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14638603#comment-14638603
 ] 

Ufuk Celebi commented on FLINK-2395:


Interesting link. Thanks for sharing!

> Check Scala catch blocks for Throwable
> --
>
> Key: FLINK-2395
> URL: https://issues.apache.org/jira/browse/FLINK-2395
> Project: Flink
>  Issue Type: Improvement
>Reporter: Till Rohrmann
>Priority: Minor
>
> As described in [1], it's not a good practice to catch {{Throwables}} in 
> Scala catch blocks because Scala uses some special exceptions for the control 
> flow. Therefore we should check whether we can restrict ourselves to only 
> catching subtypes of {{Throwable}}, such as {{Exception}}, instead.
> [1] 
> https://www.sumologic.com/2014/05/05/why-you-should-never-catch-throwable-in-scala/



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)