Skip to content

Commit 45cd4d9

Browse files
committed
update xtd::helpers::throw_helper messages
1 parent 7f7e61e commit 45cd4d9

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/xtd.core/include/xtd/helpers/exception_case.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ namespace xtd {
3636
argument_out_of_range,
3737
/// @brief The format is not valid.
3838
format,
39-
/// @brief The format does not contains close backet.
40-
format_no_close_bracket,
41-
/// @brief The format does not contains open backet.
42-
format_no_open_bracket,
39+
/// @brief The format contains close backet_without_open_bracket.
40+
format_closing_bracket_without_open_bracket,
41+
/// @brief The format contains open backet_without_end_bracket.
42+
format_opened_bracket_without_end_bracket,
4343
/// @brief The format does not contains start colon.
4444
format_no_start_colon,
4545
/// @brief The index is out of range.

src/xtd.core/src/xtd/helpers/throw_helper.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ void throw_helper::throws(exception_case ecase, const source_location& location)
2727
case exception_case::argument_null: throw xtd::argument_null_exception(to_stack_frame(location));
2828
case exception_case::argument_out_of_range: throw argument_out_of_range_exception(to_stack_frame(location));
2929
case exception_case::format: throw xtd::format_exception(to_stack_frame(location));
30-
case exception_case::format_no_close_bracket: throw xtd::format_exception(to_stack_frame(location));
31-
case exception_case::format_no_open_bracket: throw xtd::format_exception(to_stack_frame(location));
32-
case exception_case::format_no_start_colon: throw xtd::format_exception(to_stack_frame(location));
30+
case exception_case::format_closing_bracket_without_open_bracket: throw xtd::format_exception("Invalid format expression : closing bracket '{' without open bracket '}'"_t, to_stack_frame(location));
31+
case exception_case::format_opened_bracket_without_end_bracket: throw xtd::format_exception("Invalid format expression : open bracket '}' without end bracket '{'"_t, to_stack_frame(location));
32+
case exception_case::format_no_start_colon: throw xtd::format_exception("Invalid format expression : format argument must be start by ':'"_t, to_stack_frame(location));
3333
case exception_case::index_out_of_range: throw xtd::index_out_of_range_exception(to_stack_frame(location));
3434
case exception_case::invalid_operation: throw xtd::invalid_operation_exception(to_stack_frame(location));
3535
case exception_case::null_pointer: throw xtd::null_pointer_exception(to_stack_frame(location));
@@ -45,8 +45,8 @@ void throw_helper::throws(exception_case ecase, const char* message, const sourc
4545
case exception_case::argument_null: throw xtd::argument_null_exception(message, to_stack_frame(location));
4646
case exception_case::argument_out_of_range: throw xtd::argument_out_of_range_exception(message, to_stack_frame(location));
4747
case exception_case::format: throw xtd::format_exception(message, to_stack_frame(location));
48-
case exception_case::format_no_close_bracket: throw xtd::format_exception(message, to_stack_frame(location));
49-
case exception_case::format_no_open_bracket: throw xtd::format_exception(message, to_stack_frame(location));
48+
case exception_case::format_closing_bracket_without_open_bracket: throw xtd::format_exception(message, to_stack_frame(location));
49+
case exception_case::format_opened_bracket_without_end_bracket: throw xtd::format_exception(message, to_stack_frame(location));
5050
case exception_case::format_no_start_colon: throw xtd::format_exception(message, to_stack_frame(location));
5151
case exception_case::index_out_of_range: throw xtd::index_out_of_range_exception(message, to_stack_frame(location));
5252
case exception_case::invalid_operation: throw xtd::invalid_operation_exception(message, to_stack_frame(location));

0 commit comments

Comments
 (0)