[
https://issues.apache.org/jira/browse/FLINK-31456?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Alex Gubin updated FLINK-31456:
-------------------------------
Description:
h3. *The main goal of PR is to remove unnecessary panic where it should not be.*
For example:
{{msg, err := message.ToMessage()}}
{{if err != nil {}}
{{ panic(err)}}
{{}}}
So If such code is placed in a function which does not mean panic is present,
unpleasant things may happen in the future. This is why panics have been
removed from the {{_{{statefunContext}}_}} and {{_{{storage}}_}} module.
Also, the prefix Must has been added to functions that must be completed and
cannot be avoided in the future
pull request: [https://github.com/apache/flink-statefun/pull/324]
was:
h3. The main goal of PR is to remove unnecessary panic where it should not be.
For example:
```
{{msg, err := message.ToMessage()}}
{{if err != nil {}}
{{ panic(err)}}
{{}}}
```
So If such code is placed in a function which does not mean panic is present,
unpleasant things may happen in the future. This is why panics have been
removed from the {{statefunContext}} and {{storage}} module.
Also, the prefix Must has been added to functions that must be completed and
cannot be avoided in the future
pull request: [https://github.com/apache/flink-statefun/pull/324]
> Remove useless panics from Golang SDK
> -------------------------------------
>
> Key: FLINK-31456
> URL: https://issues.apache.org/jira/browse/FLINK-31456
> Project: Flink
> Issue Type: Improvement
> Components: Stateful Functions
> Reporter: Alex Gubin
> Priority: Major
>
> h3. *The main goal of PR is to remove unnecessary panic where it should not
> be.*
> For example:
> {{msg, err := message.ToMessage()}}
> {{if err != nil {}}
> {{ panic(err)}}
> {{}}}
>
> So If such code is placed in a function which does not mean panic is present,
> unpleasant things may happen in the future. This is why panics have been
> removed from the {{_{{statefunContext}}_}} and {{_{{storage}}_}} module.
> Also, the prefix Must has been added to functions that must be completed and
> cannot be avoided in the future
>
> pull request: [https://github.com/apache/flink-statefun/pull/324]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)