Skip to content

Remove uses of BaseException #280

@shsms

Description

@shsms

What happened?

When we iterate over select without consuming a previously selected value, select raises a SelectError that derives from BaseException.

The use of BaseException combined with tasks consuming exceptions makes it hard to identify that anything happened, because a broad except Exception: block doesn't catch BaseExceptions.

The use of BaseException in user code is not recommended according to python docs: https://docs.python.org/3/library/exceptions.html#BaseException

What did you expect instead?

A except Exception: catches select errors. i.e. SelectErrors derive from Exception and not BaseException.

Affected part(s)

Synchronization of multiple sources (select(), merge(), etc.) (part:synchronization)

Metadata

Metadata

Assignees

Labels

part:synchronizationAffects the synchronization of multiple sources (`select`, `merge`)priority:highAddress this as soon as possiblescope:breaking-changeBreaking change, users will need to update their codetype:bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions