guard-clauses
Service icon

Guard Clauses

Stable version 1.1.0 (Compatible with OutSystems 11)
Uploaded
 on 27 April 2024
 by 
5.0
 (3 ratings)
guard-clauses

Guard Clauses

Documentation
1.1.0

Place the appropriate Guard Clauses in the beginning of your actions to validate input parameters. Place them as necessary after further processing, to ensure your action continues getting the expected values.

It's recommended to add a suffix to the action name to quickly identify what parameter you are validating. So, for example, if you are checking that a Delivery Id is valid using the 'EnsureValidId' action, you might call it 'EnsureValidId_DeliveryId'.

The 'ParameterName' parameter is optional and defaults to the type of variable you are validating. Fill this parameter with a custom value if you want the exception message to better identify what parameter missed the validation.


1.0.0

Place the appropriate Guard Clauses in the beginning of your actions to validate input parameters. Place them as necessary after further processing, to ensure your action continues getting the expected values.

It's recommended to add a suffix to the action name to quickly identify what parameter you are validating. So, for example, if you are checking that a Delivery Id is valid using the 'EnsureValidId' action, you might call it 'EnsureValidId_DeliveryId'.

The 'ParameterName' parameter is optional and defaults to the type of variable you are validating. Fill this parameter with a custom value if you want the exception message to better identify what parameter missed the validation.