FUNCTION

requireNotEmpty

pure function requireNotEmpty<T>(value: list<T>?, [message: text]): list<T>

Deprecated (for removal): Use 'require_not_empty' instead

Asserts that a list is non-null and non-empty.

Parameters

  • value — the list to be checked.
  • message — the message for the exception to be thrown if the list is null or empty

Returns

the passed value, but with type cast from list<T>? to list<T>

Throws

  • exception — if the provided list is null or empty

Since

0.9.0

Alias of require_not_empty


pure function requireNotEmpty<T>(value: set<T>?, [message: text]): set<T>

Deprecated (for removal): Use 'require_not_empty' instead

Asserts that a set is non-null and non-empty.

Parameters

  • value — the set to be checked
  • message — the message for the exception to be thrown if the set is null or empty

Returns

the passed value, but with type cast from set<T>? to set<T>

Throws

  • exception — if the provided set is null or empty

Since

0.9.0

Alias of require_not_empty


pure function requireNotEmpty<K, V>(value: map<K, V>?, [message: text]): map<K, V>

Deprecated (for removal): Use 'require_not_empty' instead

Asserts that a map is non-null and non-empty.

Parameters

  • value — the map to be checked
  • message — the message for the exception to be thrown if the map is null or empty

Returns

the passed value, but with type cast from map<K,V>? to map<K,V>

Throws

  • exception — if the provided map is null or empty

Since

0.9.0

Alias of require_not_empty


pure function requireNotEmpty<T>(value: T?, [message: text]): T

Deprecated (for removal): Use 'require_not_empty' instead

Asserts that a value is non-null.

Parameters

  • value — the nullable value to be checked
  • message — the message for the exception to be thrown if the value is null

Returns

the passed value, but with type cast from T? to T

Throws

  • exception — if the provided value is null

Since

0.9.0

Alias of require_not_empty

© 2026 Chromia