Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Core] Modify exceptions #6355

Merged
merged 9 commits into from
Sep 25, 2024
Merged

Conversation

hjhun
Copy link
Contributor

@hjhun hjhun commented Sep 25, 2024

Description of Change

This pull request modifies the descriptions and codes of methods as follows:

  • The ChannelReceiver.Receive() can throw the InvalidOperationException.
  • The ChannelSender.Send() can throw ArgumentException and InvalidOperationException.
  • The Task.Post(action) cannot throw ArgumentException.
  • The Task.Post(action) can throw InvalidOperationException.
  • The Task.AddChannelReceiver() can throw InvalidOperationException.
  • The Task.AddEvent() can throw InvalidOperationException.
  • The Task.EmitEvent() can throw InvalidOperationException.
  • The Task.Run() can throw InvalidOperationException.
  • The Task.Quit() can throw InvalidOperationException.

Some methods should throw InvalidOperationException.
This patch modifies that.

Signed-off-by: Hwankyu Jhun <[email protected]>
@hjhun hjhun requested a review from wiertel September 25, 2024 04:19
@github-actions github-actions bot added the API12 Platform : Tizen 9.0 / TFM: net6.0-tizen9.0 label Sep 25, 2024
@hjhun hjhun requested review from upple and pjh9216 September 25, 2024 04:19
TCoreErrorFactory.CheckAndThrownException(error, "Failed to quit task");
if (error != Interop.LibTizenCore.ErrorCode.None)
{
throw new InvalidOperationException("Failed to run task");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It needs to be modified.

Suggested change
throw new InvalidOperationException("Failed to run task");
throw new InvalidOperationException("Failed to quit task");

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Signed-off-by: Hwankyu Jhun <[email protected]>
@hjhun hjhun merged commit f2a3101 into Samsung:master Sep 25, 2024
3 checks passed
bshsqa pushed a commit to bshsqa/TizenFX that referenced this pull request Sep 25, 2024
* [Core] Modify exceptions

Some methods should throw InvalidOperationException.
This patch modifies that.

Signed-off-by: Hwankyu Jhun <[email protected]>

* [Core] Add a missing exception to ChannelReceiver.Receive()

Signed-off-by: Hwankyu Jhun <[email protected]>

* [Core] Fix ambiguous error messages

Signed-off-by: Hwankyu Jhun <[email protected]>

* [Core] Fix wrong description & implementation

Signed-off-by: Hwankyu Jhun <[email protected]>

* [Core] Modify ambiguous log message

Signed-off-by: Hwankyu Jhun <[email protected]>

* [Core] Convert error to C# exception

Signed-off-by: Hwankyu Jhun <[email protected]>

* [Core] Fix wrong log message

Signed-off-by: Hwankyu Jhun <[email protected]>

* [Core] Fix wrong error handling

Signed-off-by: Hwankyu Jhun <[email protected]>

---------

Signed-off-by: Hwankyu Jhun <[email protected]>
bshsqa pushed a commit that referenced this pull request Sep 25, 2024
* [Core] Modify exceptions

Some methods should throw InvalidOperationException.
This patch modifies that.

Signed-off-by: Hwankyu Jhun <[email protected]>

* [Core] Add a missing exception to ChannelReceiver.Receive()

Signed-off-by: Hwankyu Jhun <[email protected]>

* [Core] Fix ambiguous error messages

Signed-off-by: Hwankyu Jhun <[email protected]>

* [Core] Fix wrong description & implementation

Signed-off-by: Hwankyu Jhun <[email protected]>

* [Core] Modify ambiguous log message

Signed-off-by: Hwankyu Jhun <[email protected]>

* [Core] Convert error to C# exception

Signed-off-by: Hwankyu Jhun <[email protected]>

* [Core] Fix wrong log message

Signed-off-by: Hwankyu Jhun <[email protected]>

* [Core] Fix wrong error handling

Signed-off-by: Hwankyu Jhun <[email protected]>

---------

Signed-off-by: Hwankyu Jhun <[email protected]>
@hjhun hjhun deleted the ModifyTizenCoreException branch September 26, 2024 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API12 Platform : Tizen 9.0 / TFM: net6.0-tizen9.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants