Changeset View
Changeset View
Standalone View
Standalone View
source/creator/creator_args.c
| Show First 20 Lines • Show All 745 Lines • ▼ Show 20 Lines | |||||
| static int arg_handle_abort_handler_disable(int UNUSED(argc), | static int arg_handle_abort_handler_disable(int UNUSED(argc), | ||||
| const char **UNUSED(argv), | const char **UNUSED(argv), | ||||
| void *UNUSED(data)) | void *UNUSED(data)) | ||||
| { | { | ||||
| app_state.signal.use_abort_handler = false; | app_state.signal.use_abort_handler = false; | ||||
| return 0; | return 0; | ||||
| } | } | ||||
| static void clog_abort_on_error_callback(void *fp) | |||||
| { | |||||
| BLI_system_backtrace(fp); | |||||
| fflush(fp); | |||||
brecht: I would make the description something simpler like this: "Immediately exit when internal… | |||||
| abort(); | |||||
| } | |||||
| static const char arg_handle_debug_exit_on_error_doc[] = | |||||
| "\n\t" | |||||
| "Immediately exit when internal errors are detected."; | |||||
| static int arg_handle_debug_exit_on_error(int UNUSED(argc), | |||||
| const char **UNUSED(argv), | |||||
| void *UNUSED(data)) | |||||
| { | |||||
| MEM_enable_fail_on_memleak(); | |||||
| CLG_error_fn_set(clog_abort_on_error_callback); | |||||
| return 0; | |||||
| } | |||||
| static const char arg_handle_background_mode_set_doc[] = | static const char arg_handle_background_mode_set_doc[] = | ||||
| "\n\t" | "\n\t" | ||||
| "Run in background (often used for UI-less rendering)."; | "Run in background (often used for UI-less rendering)."; | ||||
| static int arg_handle_background_mode_set(int UNUSED(argc), | static int arg_handle_background_mode_set(int UNUSED(argc), | ||||
| const char **UNUSED(argv), | const char **UNUSED(argv), | ||||
| void *UNUSED(data)) | void *UNUSED(data)) | ||||
| { | { | ||||
| print_version_short(); | print_version_short(); | ||||
| ▲ Show 20 Lines • Show All 1,500 Lines • ▼ Show 20 Lines | # endif | ||||
| BLI_argsAdd(ba, 4, "-o", "--render-output", CB(arg_handle_output_set), C); | BLI_argsAdd(ba, 4, "-o", "--render-output", CB(arg_handle_output_set), C); | ||||
| BLI_argsAdd(ba, 4, "-E", "--engine", CB(arg_handle_engine_set), C); | BLI_argsAdd(ba, 4, "-E", "--engine", CB(arg_handle_engine_set), C); | ||||
| BLI_argsAdd(ba, 4, "-F", "--render-format", CB(arg_handle_image_type_set), C); | BLI_argsAdd(ba, 4, "-F", "--render-format", CB(arg_handle_image_type_set), C); | ||||
| BLI_argsAdd(ba, 1, "-t", "--threads", CB(arg_handle_threads_set), NULL); | BLI_argsAdd(ba, 1, "-t", "--threads", CB(arg_handle_threads_set), NULL); | ||||
| BLI_argsAdd(ba, 4, "-x", "--use-extension", CB(arg_handle_extension_set), C); | BLI_argsAdd(ba, 4, "-x", "--use-extension", CB(arg_handle_extension_set), C); | ||||
| BLI_argsAdd(ba, 1, NULL, "--debug-exit-on-error", CB(arg_handle_debug_exit_on_error), NULL); | |||||
brechtUnsubmitted Not Done Inline ActionsAdd this next to the other --debug flags. brecht: Add this next to the other `--debug` flags. | |||||
| # undef CB | # undef CB | ||||
| # undef CB_EX | # undef CB_EX | ||||
| } | } | ||||
| /** | /** | ||||
| * Needs to be added separately. | * Needs to be added separately. | ||||
| */ | */ | ||||
| void main_args_setup_post(bContext *C, bArgs *ba) | void main_args_setup_post(bContext *C, bArgs *ba) | ||||
| { | { | ||||
| BLI_argsParse(ba, 4, arg_handle_load_file, C); | BLI_argsParse(ba, 4, arg_handle_load_file, C); | ||||
| } | } | ||||
| /** \} */ | /** \} */ | ||||
| #endif /* WITH_PYTHON_MODULE */ | #endif /* WITH_PYTHON_MODULE */ | ||||
I would make the description something simpler like this: "Immediately exit when internal errors are detected"
These descriptions are read by users, and what "automated tests" means in that context is unclear. It should also be clear that this is about internal errors, not all types of errors.