feat(avs-util): Add helper to translate property errors #289

Merged
icex2 merged 2 commits from pr289 into master 2024-02-25 11:36:24 +03:00
3 changed files with 14 additions and 2 deletions
+1 -1
View File
@@ -221,7 +221,7 @@ int property_set_flag(struct property *prop, int flags, int mask);
void property_destroy(struct property *prop);
avs_error property_get_error(struct property *prop);
struct property *property_clear_error(struct property *prop);
void property_clear_error(struct property *prop);
int property_psmap_import(
struct property *prop,
+10
View File
@@ -96,4 +96,14 @@ const char *avs_util_error_str(avs_error error)
}
return avs_util_error_unknown;
}
const char *avs_util_property_error_get_and_clear(struct property *prop)
{
avs_error error;
error = property_get_error(prop);
property_clear_error(prop);
willxinc commented 2024-02-25 01:01:24 +03:00 (Migrated from github.com)
Review

this returns a property* per the earlier stacked commit, is this something we need to be considering?

this returns a property* per the earlier stacked commit, is this something we need to be considering?
icex2 commented 2024-02-25 11:35:53 +03:00 (Migrated from github.com)
Review
Nope, I fixed this in https://github.com/djhackersdev/bemanitools/pull/299
return avs_util_error_str(error);
}
+3 -1
View File
@@ -5,4 +5,6 @@
const char *avs_util_error_str(avs_error error);
#endif
const char *avs_util_property_error_get_and_clear(struct property *prop);
#endif