Skip to content

Add FunctionAbortedException #3139

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

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

satvu
Copy link
Member

@satvu satvu commented Jul 23, 2025

Issue describing the changes in this PR

Pre-requisite for Azure/azure-functions-host#11159 and will also be available for extensions to consume.

Pull request checklist

IMPORTANT: Currently, changes must be backported to the in-proc branch to be included in Core Tools and non-Flex deployments.

  • My changes do not require documentation changes
    • Otherwise: Documentation issue linked to PR
  • My changes should not be added to the release notes for the next release
    • Otherwise: I've added my notes to release_notes.md
  • My changes do not need to be backported to a previous version
    • Otherwise: Backport tracked by issue/PR #issue_or_pr
  • My changes do not require diagnostic events changes
    • Otherwise: I have added/updated all related diagnostic events and their documentation (Documentation issue linked to PR)
  • I have added all required tests (Unit tests, E2E tests)

/// <summary>
/// Exception thrown when a job function invocation is aborted.
/// </summary>
[Serializable]
Copy link
Contributor

Choose a reason for hiding this comment

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

[Serializable] and the protected ctor below are deprecated starting in .net8. Considering that is the lowest in-support .NET version, maybe we should stop including this?

https://learn.microsoft.com/en-us/dotnet/fundamentals/syslib-diagnostics/syslib0051

Copy link

@Frulfump Frulfump Jul 25, 2025

Choose a reason for hiding this comment

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

The .NET Team has stopped including that attribute for any new Exception created since .NET 8 so I think it makes sense for second party (and third-party) to also not include this attribute.

https://github.com/dotnet/designs/blob/ece1f853d2ba4c174151291056ff29d9101d0091/accepted/2020/better-obsoletion/binaryformatter-obsoletion.md?plain=1#L54

@liliankasem
Copy link
Member

Actually we have been meaning to move https://github.com/Azure/azure-functions-host/blob/dev/src/WebJobs.Script/Description/Workers/FunctionInvocationCanceledException.cs to the WebJobs SDK, do you think we can include that in this PR since we're touching exceptions already?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants