Skip to content

Document error() function for @assert constraints#2541

Open
rjayasinghe wants to merge 1 commit intomainfrom
2549_error_functions
Open

Document error() function for @assert constraints#2541
rjayasinghe wants to merge 1 commit intomainfrom
2549_error_functions

Conversation

@rjayasinghe
Copy link
Copy Markdown
Contributor

Summary

  • Adds a new Error Functions subsection under the @assert: annotation documentation in guides/services/constraints.md
  • Documents the error() function signature with all three arguments (message, parameters, targets)
  • Notes that this feature is currently CAP Java only
  • Includes three examples using the bookshop domain (Books, price, minPrice, stock, quantity, title)

Test plan

  • Review rendered output of the new subsection in the docs preview
  • Verify the three CDS code examples render correctly with syntax highlighting
  • Verify the [!code focus] annotations highlight correctly in the introductory example
  • Check the argument table renders correctly
  • Confirm links to #localized-messages resolve correctly

Adds a new "Error Functions" subsection under the @Assert annotation
documentation explaining how to use the error() function to attach
dynamic message parameters and explicit error targets to constraint
violations. Includes signature table and three examples using the
bookshop domain.
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.

1 participant