Skip to content

feat: add raise() function #2702

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

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft

feat: add raise() function #2702

wants to merge 6 commits into from

Conversation

Shvandre
Copy link
Contributor

@Shvandre Shvandre commented Apr 9, 2025

Issue

Closes #2701.

@Shvandre Shvandre requested a review from a team as a code owner April 9, 2025 12:12
@novusnota novusnota added this to the v1.6.6 milestone Apr 9, 2025
@novusnota
Copy link
Member

novusnota commented Apr 9, 2025

🐗 docs incoming

UPD: Done!

Copy link
Member

@anton-trunov anton-trunov left a comment

Choose a reason for hiding this comment

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

  1. needs a CHANGELOG entry marked as a breaking change
  2. needs a test what happens if the user already defined a function like fun raise(s: String) { throw 42 }

@Shvandre Shvandre marked this pull request as draft April 9, 2025 12:23
ref,
);
}
const resolved0 = resolved[0]!;
Copy link
Member

Choose a reason for hiding this comment

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

arg

name: "raise",
resolve: (_ctx, args, ref) => {
if (args.length !== 1) {
throwCompilationError(
Copy link
Member

Choose a reason for hiding this comment

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

we need a test for each new throw

@novusnota novusnota modified the milestones: v1.6.6, v1.7.0, v1.6.7, v1.8.0 Apr 16, 2025
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.

Throw analogue, that uses text, not integer exit codes
5 participants