Prefer NEW to CREATE OBJECT for classes with non-class-based exceptions
Nobody has claimed this yet.
- Dominant language
- ABAP
- Stars
- 435
- Forks
- 77
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
Is the suggestion "Prefer NEW to CREATE OBJECT" for classes with non-class-based exceptions ok? As far as I know with NEW no classic exceptions can be handled.
Regards,
Günter
Example:
data alv type ref to cl_gui_alv_grid.
create object alv
exporting i_parent = container
exceptions error_cntl_create = 1
error_cntl_init = 2
error_cntl_link = 3
error_dp_create = 4
others = 5.
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file, test, or rule entry point is named in the issue. Start by locating the check that emits “Prefer NEW to CREATE OBJECT” and examine how it handles classic exceptions; done means the rule’s behavior for this case is resolved and reflected in the relevant check or test.
Written by the indexing model from the issue text.
Assessment
- Domain
- devtools, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100