Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

G-5040: "When others" should be allowed for Logger with RAISE #77

Closed
Assignees
kibeha
Labels
Milestone
@S-Koell

Description

@S-Koell

The OraLogger best practice (Link) looks like this:

exception    when others then      logger.log_error('Unhandled Exception', l_scope, null, l_params);      raise;  end todo_proc_name;

This will always give me

G-5040: Avoid use of WHEN OTHERS clause in an exception section without any other specific handlers.

I also dont want to disable this rule, because in general it's good. But with logging the error and reraising it I dont see any problem with it.
Could there be an exception for this check when doing a raise (and logging maybe) inside the "WHEN OTHERS"?
(it really bothers me because we use this practice for all fkt/procs and therefore get a ton of these PLSQL Cop warnings)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp