grass  7.8.6
About: GRASS (Geographic Resources Analysis Support System) is a raster- and vector-based GIS, image processing system, graphics production system and spatial modeling system.
  Fossies Dox: grass-7.8.6.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

error.c File Reference

GIS Library - Error messages functions. More...

#include <stdlib.h>
#include <string.h>
#include <setjmp.h>
#include <unistd.h>
#include <time.h>
#include <stdarg.h>
#include <sys/types.h>
#include <grass/glocale.h>
#include <grass/gis.h>
#include "gis_local_proto.h"
Include dependency graph for error.c:

Go to the source code of this file.

Macros

#define MSG   0
 A message. More...
 
#define WARN   1
 A warning message. More...
 
#define ERR   2
 A fatal error message. More...
 

Functions

static int print_word (FILE *, char **, int *, const int)
 
static void print_sentence (FILE *, const int, const char *)
 
static void print_error (const char *, const int)
 
static void mail_msg (const char *, int)
 
static int write_error (const char *, int, time_t, const char *)
 
static void log_error (const char *, int)
 
jmp_buf * G_fatal_longjmp (int enable)
 
static void vfprint_error (int type, const char *template, va_list ap)
 
void G_message (const char *msg,...)
 Print a message to stderr. More...
 
void G_verbose_message (const char *msg,...)
 Print a message to stderr but only if module is in verbose mode. More...
 
void G_important_message (const char *msg,...)
 Print a message to stderr even in brief mode (verbosity=1) More...
 
void G_fatal_error (const char *msg,...)
 Print a fatal error message to stderr. More...
 
void G_warning (const char *msg,...)
 Print a warning message to stderr. More...
 
int G_suppress_warnings (int flag)
 Suppress printing a warning message to stderr. More...
 
int G_sleep_on_error (int flag)
 Turn on/off no_sleep flag. More...
 
void G_set_error_routine (int(*error_routine)(const char *, int))
 Establishes error_routine as the routine that will handle the printing of subsequent error messages. More...
 
void G_unset_error_routine (void)
 After this call subsequent error messages will be handled in the default method. More...
 
void G_init_logging (void)
 
int G_info_format (void)
 Get current message format. More...
 

Variables

static int(* ext_error )(const char *, int)
 
static int no_warn = FALSE
 
static int no_sleep = TRUE
 
static int grass_info_format
 
static char * logfile
 
static char * prefix_std [3]
 
static struct Counter message_id
 
static int fatal_longjmp
 
static jmp_buf fatal_jmp_buf
 

Detailed Description

GIS Library - Error messages functions.

(C) 1999-2011 by the GRASS Development Team

This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.

Author
USACERL and many others

Definition in file error.c.

Macro Definition Documentation

◆ ERR

#define ERR   2

A fatal error message.

Definition at line 44 of file error.c.

◆ MSG

#define MSG   0

A message.

Definition at line 32 of file error.c.

◆ WARN

#define WARN   1

A warning message.

Definition at line 38 of file error.c.

Function Documentation

◆ G_fatal_error()

void G_fatal_error ( const char *  msg,
  ... 
)

Print a fatal error message to stderr.

The output format depends on environment variable GRASS_MESSAGE_FORMAT

By default, the message is handled by an internal routine which prints the message to the screen. Using G_set_error_routine() the programmer can have the message handled by another routine. This is especially useful if the message should go to a particular location on the screen when using curses or to a location on a graphics device (monitor).

Parameters
msgstring (cannot be NULL)
Returns
Terminates with an exit status of EXIT_FAILURE if no external routine is specified by G_set_error_routine()

Definition at line 160 of file error.c.

References ERR, fatal_jmp_buf, fatal_longjmp, G__call_error_handlers(), G_verbose(), getenv(), and vfprint_error().

Referenced by AS_class_apply_algorithm(), AS_class_equiprob(), AS_option_to_algorithm(), boq_load(), Cairo_begin_raster(), Cairo_Bitmap(), Cairo_Graph_set(), cairo_read_bmp(), cairo_read_ppm(), cairo_read_xid(), cairo_write_bmp(), cairo_write_ppm(), cairo_write_xid(), calccoef(), check_create_import_opts(), check_index(), check_level(), check_num_volfiles(), check_numsets(), check_status(), check_string(), check_write_window(), clean_dir(), compute_window_row(), convert(), convolution_line(), copy_line_nodes(), copy_table(), D_open_driver(), D_parse_color(), db_set_default_connection(), dig__fread_port_O(), dig__fwrite_port_O(), dig__read_head(), dig_angle_next_line(), dig_area_add_isle(), dig_area_del_isle(), dig_del_area(), dig_del_isle(), dig_del_line(), dig_find_line_box(), dig_fwrite(), dig_load_plus(), dig_node_line_angle(), dig_Rd_Plus_head(), dig_Rd_spidx_head(), dig_read_cidx_head(), dig_spidx_del_area(), dig_spidx_del_isle(), dig_spidx_del_line(), dig_spidx_del_node(), dig_Wr_spidx_head(), dig_write_frmt_ascii(), extract_outer_contour(), find_offsets(), fopen_histogram_new(), format(), format_error(), format_l(), G__calloc(), G__check_option_rules(), G__describe_option_rules(), G__gisinit(), G__malloc(), G__next(), G__no_gisinit(), G__read_Cell_head_array(), G__realloc(), G_adjust_Cell_head(), G_adjust_Cell_head3(), G_adjust_window_ll(), G_bz2_compress(), G_bz2_expand(), G_check_input_output_name(), G_compress(), G_compress_bound(), G_config_path(), G_expand(), G_fseek(), G_get_element_window(), G_get_projsrid(), G_get_projwkt(), G_getenv(), G_getenv2(), G_home(), G_list(), G_location_path(), G_ls2(), G_make_mapset(), G_mapset(), G_mapset_path(), G_math_cholesky_sband_decomposition(), G_math_solver_pcg_sband(), G_mkstemp(), G_open_option_file(), G_option_to_separator(), G_owner(), G_parser(), G_read_ellipsoid_table(), G_read_key_value_file(), G_srand48_auto(), G_vector_norm_euclid(), G_vector_norm_maxval(), G_write_key_value_file(), G_write_projsrid(), G_write_projwkt(), G_zstd_compress(), G_zstd_compress_bound(), G_zstd_expand(), get_colorinfo(), get_ellipsoid_parameters(), GK_print_keys(), Gp_load_sites(), Gp_load_sites_thematic(), GPJ__get_ellipsoid_params(), GPJ_init_transform(), GPJ_transform(), GPJ_transform_array(), GS_load_att_map(), Gv_load_vect_thematic(), HTML_Graph_set(), IL_check_at_points_2d(), IL_create_bitmask(), IL_interp_segments_2d_parallel(), IL_vector_input_data_2d(), IL_write_temp_2d(), init_cairo(), init_file(), init_xlib(), is_flag(), kdtree_balance(), kdtree_dnn(), kdtree_insert2(), kdtree_knn(), kdtree_replace(), ll_check_ns(), ll_wrap(), load_rules_name(), M_do_list(), M_do_remove(), M_read_list(), main(), make_mapset_element(), map_format(), misc_read_line(), misc_write_line(), module_gui_wx(), N_alloc_array_2d(), N_alloc_array_3d(), N_assemble_les_2d_param(), N_assemble_les_3d_param(), N_compute_gradient_field_2d(), N_compute_gradient_field_3d(), N_compute_gradient_field_components_2d(), N_compute_gradient_field_components_3d(), N_copy_array_2d(), N_copy_array_3d(), N_math_array_2d(), N_math_array_3d(), N_norm_array_2d(), N_norm_array_3d(), N_read_rast3d_to_array_3d(), N_read_rast_to_array_2d(), N_write_array_2d_to_rast(), N_write_array_3d_to_rast3d(), NetA_articulation_points(), NetA_betweenness_closeness(), NetA_compute_bridges(), NetA_eigenvector_centrality(), NetA_find_path(), NetA_flow(), NetA_get_node_costs(), NetA_init_timetable_from_db(), NetA_initialise_varray(), NetA_min_cut(), NetA_spanning_tree(), NetA_split_vertices(), NetA_strongly_connected_components(), NetA_weakly_connected_components(), Nviz_create_render_window(), open_env(), open_new(), open_raster_new(), P_Sparse_Points(), pg_addedge(), pj_get_kv(), pj_get_string(), port_init(), PS_Graph_set(), put_data(), put_data_gdal(), put_null_value_row(), put_raster_row(), Rast3d_fatal_error(), Rast3d_fatal_error_noargs(), Rast__check_fp_type(), Rast__check_init(), Rast__check_null_bit(), Rast__null_bitstream_size(), Rast__open_null_write(), Rast__open_old(), Rast__read_null_bits(), Rast__write_null_bits(), Rast_close(), Rast_create_gdal_link(), Rast_get_cellhd(), Rast_get_sample(), Rast_get_vrt(), Rast_get_window(), Rast_make_random_colors(), Rast_map_is_fp(), Rast_map_type(), Rast_option_to_interp_type(), Rast_put_cellhd(), Rast_put_reclass(), Rast_quantize_fp_map(), Rast_read_color_rule(), Rast_read_color_rules(), Rast_read_histogram(), Rast_set_fp_type(), Rast_set_quant_rules(), Rast_unopen(), Rast_window_cols(), Rast_window_rows(), Rast_write_colors(), Rast_write_fp_range(), Rast_write_history(), Rast_write_quant(), Rast_write_range(), Rast_write_rstats(), rbtree_make_node(), read_bmp(), read_data(), read_data_compressed(), read_data_fp_compressed(), read_data_uncompressed(), read_ellipsoid_table(), read_gdal_options(), read_image(), read_null_bits_compressed(), read_pgm(), read_png(), read_polygon_points(), read_ppm(), rtree_load_to_file(), rtree_load_to_memory(), rtree_write_from_file(), rtree_write_from_memory(), RTreeWriteBranch(), RTreeWriteNode(), seg_seek_fast(), seg_seek_slow(), select_by_query(), set_login(), set_option(), tgis_set_default_connection(), update_window_mappings(), V1_close_nat(), V1_close_ogr(), V1_close_pg(), V1_delete_line_ogr(), V1_delete_line_pg(), V1_open_new_ogr(), V1_open_new_pg(), V1_open_old_ogr(), V1_open_old_pg(), V1_read_line_ogr(), V1_read_line_pg(), V1_read_next_line_ogr(), V1_read_next_line_pg(), V1_rewind_ogr(), V1_rewind_pg(), V1_rewrite_line_ogr(), V1_rewrite_line_pg(), V1_write_line_ogr(), V1_write_line_pg(), V2__add_area_cats_to_cidx_nat(), V2__delete_area_cats_from_cidx_nat(), V2__write_area_sfa(), V2_close_ogr(), V2_close_pg(), V2_delete_line_pg(), V2_delete_line_sfa(), V2_open_old_ogr(), V2_open_old_pg(), V2_read_line_geos(), V2_read_line_pg(), V2_read_line_sfa(), V2_read_next_line_ogr(), V2_read_next_line_pg(), V2_rewind_ogr(), V2_rewind_pg(), V2_rewrite_line_pg(), V2_rewrite_line_sfa(), V2_write_line_pg(), V2_write_line_sfa(), Vect__build_sfa(), Vect__get_area_points(), Vect__open_old(), Vect__open_topo_pg(), Vect__read_line_geos(), Vect_append_point(), Vect_break_polygons_mem(), Vect_build_line_area(), Vect_build_ogr(), Vect_build_partial(), Vect_build_pg(), Vect_build_sidx(), Vect_cat_set(), Vect_cats_set_constraint(), Vect_check_input_output_name(), Vect_cidx_find_all(), Vect_cidx_get_cat_by_index(), Vect_copy(), Vect_copy_map_lines_field(), Vect_default_field_info(), Vect_get_area_boundaries(), Vect_get_area_centroid(), Vect_get_area_isle(), Vect_get_area_num_isles(), Vect_get_centroid_area(), Vect_get_isle_area(), Vect_get_isle_boundaries(), Vect_get_isle_points(), Vect_get_line_nodes(), Vect_graph_add_edge(), Vect_graph_build(), Vect_line_check_intersection2(), Vect_line_delete_point(), Vect_line_get_point(), Vect_line_insert_point(), Vect_line_intersection2(), Vect_net_build_graph(), Vect_net_get_line_cost(), Vect_net_ttb_build_graph(), Vect_net_ttb_shortest_path(), Vect_new_cats_struct(), Vect_new_line_struct(), Vect_new_map_struct(), Vect_open_fidx(), Vect_overlay(), Vect_read_area_geos(), Vect_read_dblinks(), Vect_read_line_geos(), Vect_remove_small_areas_ext(), Vect_remove_small_areas_nat(), Vect_rename(), Vect_save_fidx(), Vect_save_frmt(), Vect_set_db_updated(), Vect_sfa_get_num_features(), Vect_snap_lines_list_kdtree(), Vect_spatial_index_del_item(), Vect_write_ascii(), Vect_write_colors(), wps_print_ident_title_abstract(), wps_print_process_description_begin(), write_bmp(), write_cats(), write_data(), write_data_compressed(), write_image(), write_null_bits_compressed(), write_pgm(), write_png(), write_ppm(), and write_prolog().

◆ G_fatal_longjmp()

jmp_buf * G_fatal_longjmp ( int  enable)

Definition at line 67 of file error.c.

References fatal_jmp_buf, and fatal_longjmp.

◆ G_important_message()

void G_important_message ( const char *  msg,
  ... 
)

Print a message to stderr even in brief mode (verbosity=1)

Usually just G_percent()/G_clicker() would be shown at this level. This allows important non-error/warning messages to display as well.

The output format depends on environment variables GRASS_MESSAGE_FORMAT and GRASS_VERBOSE

Parameters
msgstring (cannot be NULL)

Definition at line 131 of file error.c.

References G_verbose(), G_verbose_min(), MSG, and vfprint_error().

Referenced by copy_lines_2(), find_file(), G__calloc(), G__malloc(), G__realloc(), GPJ_init_transform(), IL_vector_input_data_2d(), ll_check_ew(), ll_check_ns(), Vect__copy_areas(), Vect_build_nat(), Vect_default_field_info(), Vect_snap_lines(), Vect_snap_lines_list_kdtree(), Vect_snap_lines_list_rtree(), and Vect_write_ascii().

◆ G_info_format()

int G_info_format ( void  )

Get current message format.

Maybe set to either "standard" or "gui" (normally GRASS takes care)

Returns
grass_info_format value

Definition at line 532 of file error.c.

References G_init_logging(), and grass_info_format.

Referenced by check_overwrite(), G_clicker(), G_percent(), G_progress(), and print_error().

◆ G_init_logging()

◆ G_message()

void G_message ( const char *  msg,
  ... 
)

Print a message to stderr.

The output format depends on environment variable GRASS_MESSAGE_FORMAT

Parameters
msgstring (cannot be NULL)

Definition at line 90 of file error.c.

References G_verbose(), G_verbose_std(), MSG, and vfprint_error().

Referenced by build_ogr(), copy_lines_2(), G_done_msg(), G_math_solver_cholesky(), G_math_solver_gauss(), G_math_solver_gs(), G_math_solver_jacobi(), G_math_solver_lu(), G_math_solver_sparse_gs(), G_math_solver_sparse_jacobi(), G_matrix_print(), Gp_load_sites(), Gp_load_sites_thematic(), Gs_loadmap_as_bitmap(), Gs_loadmap_as_char(), Gs_loadmap_as_float(), Gs_loadmap_as_int(), Gs_loadmap_as_short(), Gs_pack_colors(), Gs_pack_colors_float(), Gv_load_vect(), Gv_load_vect_thematic(), GVL_load_vol(), I_compute_georef_equations_tps(), IL_create_bitmask(), IL_interp_segments_2d_parallel(), IL_vector_input_data_2d(), kdtree_replace(), M_do_copy(), M_do_remove(), M_do_rename(), N_gwflow_2d_calc_water_budget(), N_gwflow_3d_calc_water_budget(), N_read_rast3d_to_array_3d(), N_read_rast_to_array_2d(), N_write_array_2d_to_rast(), N_write_array_3d_to_rast3d(), NetA_spanning_tree(), parse_d_mask_rule(), Rast_create_gdal_link(), show_colormode(), solver_bicgstab(), solver_cg(), solver_pcg(), Vect__copy_areas(), Vect__open_old(), Vect_break_polygons_file(), Vect_break_polygons_mem(), Vect_build_nat(), Vect_build_ogr(), Vect_build_partial(), Vect_build_pg(), Vect_net_build_graph(), Vect_net_ttb_build_graph(), Vect_remove_small_areas_ext(), Vect_remove_small_areas_nat(), and Vect_topo_check().

◆ G_set_error_routine()

void G_set_error_routine ( int(*)(const char *, int)  error_routine)

Establishes error_routine as the routine that will handle the printing of subsequent error messages.

Parameters
error_routineroutine will be called like this: error_routine(msg, fatal)
Returns

Definition at line 261 of file error.c.

References ext_error.

◆ G_sleep_on_error()

int G_sleep_on_error ( int  flag)

Turn on/off no_sleep flag.

If flag is 0, then no pause will occur after printing an error or warning message. Otherwise the pause will occur.

Parameters
flagif non-zero/zero value is given G_sleep() will be activated/deactivated
Returns
previous no_sleep value

Definition at line 243 of file error.c.

References no_sleep.

◆ G_suppress_warnings()

int G_suppress_warnings ( int  flag)

Suppress printing a warning message to stderr.

Parameters
flaga warning message will be suppressed if non-zero value is given
Returns
previous flag

Definition at line 223 of file error.c.

References no_warn.

Referenced by G_parser(), get_ref(), I_get_group(), I_get_group_title(), I_get_subgroup(), and I_get_target().

◆ G_unset_error_routine()

void G_unset_error_routine ( void  )

After this call subsequent error messages will be handled in the default method.

Error messages are printed directly to the screen: ERROR: message or WARNING: message

Returns
0

Definition at line 274 of file error.c.

References ext_error.

◆ G_verbose_message()

◆ G_warning()

void G_warning ( const char *  msg,
  ... 
)

Print a warning message to stderr.

The output format depends on environment variable GRASS_MESSAGE_FORMAT

A warning message can be suppressed by G_suppress_warnings()

Parameters
msgstring (cannot be NULL)
Returns

Definition at line 204 of file error.c.

References G_verbose(), no_warn, vfprint_error(), and WARN.

Referenced by add_geometry_ogr(), AS_class_equiprob(), buffer_lines(), build_ogr(), cache_feature(), check_coor(), check_map(), check_string(), clean_dir(), close_cell_new(), close_cell_old(), close_g3d_file(), close_new(), close_old(), compare_xpnts(), compute_scatts_from_chunk_row(), convert(), copy_line_nodes(), copy_lines_1(), copy_lines_2(), copy_table(), create_ogr_layer(), create_table(), D_open_driver(), D_plot_icon(), db_delete_table(), db_get_column(), db_get_table_number_of_rows(), db_legal_tablename(), db_select_CatValArray(), db_select_int(), db_select_value(), db_start_driver_open_database(), db_table_exists(), db_table_to_sql(), delete_dummy(), dig__read_head(), dig_add_area(), dig_add_isle(), dig_area_add_isle(), dig_cidx_del_cat(), dig_del_area(), dig_file_load(), dig_out_of_memory(), dig_Rd_Plus_head(), dig_Rd_spidx_head(), dig_read_cidx_head(), dig_read_frmt_ascii(), dig_write_plus_file(), do_redirects(), do_signals(), do_spawn(), EmbedGivenNulls(), err(), extract_contour(), find_cross(), find_shortest_path(), fopen_group_file_old(), fopen_subgroup_file_old(), G__check_gisinit(), G__matrix_add(), G__open(), G__open_misc(), G__wps_print_process_description(), G_bz2_compress(), G_bz2_expand(), G_check_compressor(), G_check_input_output_name(), G_copy_file(), G_debug(), G_distance_point_to_line_segment(), G_get_3dview(), G_get_projinfo(), G_get_projunits(), G_legal_filename(), G_lz4_compress(), G_lz4_expand(), G_math_cholesky_decomposition(), G_math_solver_cholesky(), G_matrix_copy(), G_matrix_init(), G_matrix_inverse(), G_matrix_LU_solve(), G_matrix_product(), G_matrix_read(), G_matrix_scalar_mul(), G_matrix_set(), G_matrix_set_element(), G_matvect_extract_vector(), G_matvect_get_column(), G_matvect_get_row(), G_matvect_product(), G_parser(), G_plot_area(), G_plot_polygon(), G_put_3dview(), G_read_compressed(), G_read_datum_table(), G_read_ellipsoid_table(), G_read_vector_timestamp(), G_vector_copy(), G_vector_init(), G_vector_norm1(), G_vector_product(), G_vector_set(), G_vector_sub(), G_write_compressed(), G_write_uncompressed(), G_write_vector_timestamp(), G_zstd_compress(), G_zstd_expand(), get_line_type(), get_mapset_connection_name(), get_null_value_row_nomask(), get_rows_and_cols_bounds(), gk_make_framesfromkeys(), gk_make_linear_framesfromkeys(), GK_update_frames(), Gp_load_sites(), Gp_load_sites_thematic(), GP_str_to_marker(), GPJ_get_datum_transform_by_name(), GPJ_grass_to_osr(), GPJ_init_transform(), GPJ_osr_to_grass(), GPJ_transform(), GPJ_transform_array(), grass_to_wkt(), Gs_build_256lookup(), gs_err(), Gs_get_cat_label(), Gs_load_3dview(), GS_load_att_map(), Gs_loadmap_as_bitmap(), Gs_loadmap_as_char(), Gs_loadmap_as_float(), Gs_loadmap_as_int(), Gs_loadmap_as_short(), gs_malloc_lookup(), Gs_numtype(), Gs_pack_colors(), Gs_pack_colors_float(), gs_put_label(), GS_write_ppm(), GS_write_tif(), GS_write_zoom(), gsbm_masks(), gsd_put_legend(), gsd_rot(), gsd_wall(), gsdrape_set_surface(), Gv_load_vect(), Gv_load_vect_thematic(), Gvl_load_colors_data(), I_cluster_exec(), I_compute_scatts(), I_create_cat_rast(), I_fopen_group_file_append(), I_fopen_group_file_new(), I_fopen_sigset_file_new(), I_fopen_subgroup_file_append(), I_fopen_subgroup_file_new(), I_get_control_points(), I_get_target(), I_iclass_analysis(), I_iclass_init_group(), I_iclass_statistics_get_histo(), I_iclass_statistics_get_max(), I_iclass_statistics_get_mean(), I_iclass_statistics_get_min(), I_iclass_statistics_get_product(), I_iclass_statistics_get_range_max(), I_iclass_statistics_get_range_min(), I_iclass_statistics_get_stddev(), I_iclass_statistics_get_sum(), I_iclass_write_signatures(), I_insert_patch_to_cat_rast(), I_put_control_points(), I_rasterize(), IL_grid_calc_2d(), IL_interp_segments_2d(), IL_interp_segments_2d_parallel(), IL_output_2d(), IL_resample_output_2d(), IL_vector_input_data_2d(), init(), kdtree_balance(), kdtree_insert2(), kdtree_remove(), kdtree_replace(), ll_wrap(), M_do_copy(), M_do_remove(), M_do_rename(), main(), make_perimeter(), make_statistics(), map_format(), misc_read_line(), N_gwflow_2d_calc_water_budget(), N_gwflow_3d_calc_water_budget(), name2sql(), NetA_distance_to_points(), NetA_init_distinct(), NetA_init_timetable_from_db(), NetA_initialise_varray(), NetA_strongly_connected_components(), NetA_timetable_shortest_path(), NetA_varray_to_nodes(), NetA_weakly_connected_components(), Nviz_color_from_str(), Nviz_create_render_window(), Nviz_make_current_render_window(), Nviz_new_light(), Nviz_new_map_obj(), Nviz_set_focus_state(), open_g3d_file(), open_new(), P_Create_Aux2_Table(), P_Create_Aux4_Table(), P_popmatrix(), P_pushmatrix(), parse_d_mask_rule(), parse_fontcap(), pj_do_proj(), pj_do_transform(), pj_get_kv(), pj_get_string(), pr_winerr(), process_point(), Rast3d_close(), Rast3d_open_cell_new(), Rast3d_read_cats(), Rast3d_read_colors(), Rast3d_read_range(), Rast3d_read_window(), Rast3d_readWriteHeader(), Rast3d_rewrite_header(), Rast3d_write_colors(), Rast__check_for_auto_masking(), Rast__check_fp_type(), Rast__close_null(), Rast__quant_import(), Rast__read_null_row_ptrs(), Rast__read_row_ptrs(), Rast_close_gdal_write_link(), Rast_create_gdal_link(), Rast_get_reclass(), Rast_is_null_value(), Rast_put_cell_title(), Rast_put_reclass(), Rast_read_cats(), Rast_read_colors(), Rast_read_fp_range(), Rast_read_histogram(), Rast_read_history(), Rast_read_range(), Rast_read_rstats(), Rast_read_vector_cats(), Rast_set_null_value(), Rast_set_window(), Rast_write_quant(), rbtree_create(), rbtree_debug(), rbtree_traverse_start(), read_coor(), read_datum_table(), read_dblinks_nat(), read_dblinks_ogr(), read_dblinks_pg(), read_dummy(), read_ellipsoid_table(), read_file(), read_fontmap(), read_int(), read_line(), read_next_line_ogr(), read_off_t(), read_timestamp(), restore_dummy(), rewrite_dummy(), Rowio_setup(), S_read(), scancatlabel(), seek_only(), seg_format(), seg_pagein(), seg_pageout(), seg_setup(), Segment_get_row(), Segment_init(), segment_intersection_2d(), segment_intersection_2d_tol(), Segment_open(), Segment_put(), Segment_put_row(), segments_x_ray(), set_login(), set_option(), SimpleErrorMessage(), solver_bicgstab(), solver_cg(), solver_pcg(), sync_and_close(), tokenize(), undo_signals(), update_cat_scatt_plts(), V1_close_nat(), V1_close_pg(), V1_delete_line_ogr(), V1_delete_line_pg(), V1_open_new_ogr(), V1_open_new_pg(), V1_open_old_nat(), V1_open_old_pg(), V1_read_line_ogr(), V1_read_line_pg(), V1_rewrite_line_ogr(), V1_rewrite_line_pg(), V2__add_line_to_topo_sfa(), V2__delete_line_from_topo_nat(), V2__write_area_sfa(), V2_close_ogr(), V2_close_pg(), V2_delete_line_nat(), V2_delete_line_pg(), V2_delete_line_sfa(), V2_open_old_ogr(), V2_open_old_pg(), V2_read_line_nat(), V2_read_line_pg(), V2_read_line_sfa(), V2_read_next_line_pg(), V2_restore_line_nat(), V2_rewrite_line_nat(), V2_rewrite_line_pg(), V2_rewrite_line_sfa(), V2_write_line_sfa(), Vect__copy_areas(), Vect__delete(), Vect__open_old(), Vect__read_head(), Vect__write_head(), Vect_add_dblink(), Vect_area_alive(), Vect_build_line_area(), Vect_build_nat(), Vect_build_ogr(), Vect_build_partial(), Vect_build_pg(), Vect_build_sidx_from_topo(), Vect_cats_in_constraint(), Vect_cats_set_constraint(), Vect_check_input_output_name(), Vect_cidx_open(), Vect_cidx_save(), Vect_close(), Vect_coor_info(), Vect_copy(), Vect_copy_map_dblinks(), Vect_copy_map_lines_field(), Vect_copy_table_by_cats(), Vect_copy_tables(), Vect_delete_line(), Vect_fidx_dump(), Vect_get_area_box(), Vect_get_area_points(), Vect_get_area_points_geos(), Vect_get_dblink(), Vect_get_finfo_dsn_name(), Vect_get_finfo_format_info(), Vect_get_finfo_geometry_type(), Vect_get_finfo_layer_name(), Vect_get_finfo_topology_info(), Vect_get_isle_box(), Vect_get_isle_points(), Vect_get_line_areas(), Vect_get_line_box(), Vect_get_map_box1(), Vect_get_next_line_id(), Vect_get_node_coor(), Vect_get_point_in_poly(), Vect_get_point_in_poly_isl(), Vect_graph_shortest_path(), Vect_isle_alive(), Vect_isle_find_area(), Vect_legal_filename(), Vect_level(), Vect_line_alive(), Vect_line_check_intersection(), Vect_line_check_intersection2(), Vect_line_segment(), Vect_map_add_dblink(), Vect_map_del_dblink(), Vect_merge_lines(), Vect_net_build_graph(), Vect_net_ttb_build_graph(), Vect_net_ttb_shortest_path(), Vect_node_alive(), Vect_open_fidx(), Vect_open_sidx(), Vect_open_topo(), Vect_overlay_and(), Vect_read_ascii(), Vect_read_ascii_head(), Vect_read_line(), Vect_read_next_line(), Vect_rename(), Vect_restore_line(), Vect_rewrite_line(), Vect_save_fidx(), Vect_save_frmt(), Vect_save_sidx(), Vect_save_topo(), Vect_segment_intersection(), Vect_set_constraint_field(), Vect_set_open_level(), Vect_set_varray_from_cat_list(), Vect_set_varray_from_cat_string(), Vect_set_varray_from_db(), Vect_sfa_get_num_features(), Vect_sfa_line_astext(), Vect_str_to_cat_list(), Vect_topo_check(), Vect_write_ascii(), Vect_write_dblinks(), Vect_write_line(), vector2perimeters(), Vedit_delete_area(), Vedit_delete_area_centroid(), Vedit_delete_lines(), Vedit_modify_cats(), wps_print_ident_title_abstract(), wps_print_process_description_begin(), write_attributes(), write_dummy(), write_feature(), write_file(), write_fp_format(), write_int(), write_off_t(), write_timestamp(), writeRange(), and zero_fill().

◆ log_error()

static void log_error ( const char *  msg,
int  fatal 
)
static

Definition at line 334 of file error.c.

References grass::fatal(), G_gisbase(), GPATH_MAX, NULL, and write_error().

Referenced by print_error().

◆ mail_msg()

static void mail_msg ( const char *  msg,
int  fatal 
)
static

Definition at line 418 of file error.c.

References grass::fatal(), Popen::fp, G_close_mail(), and G_open_mail().

Referenced by print_error().

◆ print_error()

static void print_error ( const char *  msg,
const int  type 
)
static

◆ print_sentence()

static void print_sentence ( FILE *  fd,
const int  type,
const char *  msg 
)
static

Definition at line 483 of file error.c.

References ERR, G_counter_next(), message_id, MSG, next(), type, and WARN.

Referenced by print_error().

◆ print_word()

static int print_word ( FILE *  fd,
char **  word,
int *  len,
const int  lead 
)
static

Definition at line 430 of file error.c.

References b.

Referenced by print_error().

◆ vfprint_error()

static void vfprint_error ( int  type,
const char *  template,
va_list  ap 
)
static

◆ write_error()

static int write_error ( const char *  msg,
int  fatal,
time_t  clock,
const char *  cwd 
)
static

Definition at line 387 of file error.c.

References grass::fatal(), G_init_logging(), G_program_name(), G_whoami(), and logfile.

Referenced by log_error().

Variable Documentation

◆ ext_error

int(* ext_error) (const char *, int) ( const char *  ,
int   
)
static

Definition at line 48 of file error.c.

Referenced by G_set_error_routine(), G_unset_error_routine(), and print_error().

◆ fatal_jmp_buf

jmp_buf fatal_jmp_buf
static

Definition at line 65 of file error.c.

Referenced by G_fatal_error(), and G_fatal_longjmp().

◆ fatal_longjmp

int fatal_longjmp
static

Definition at line 64 of file error.c.

Referenced by G_fatal_error(), and G_fatal_longjmp().

◆ grass_info_format

int grass_info_format
static

Definition at line 52 of file error.c.

Referenced by G_info_format(), and G_init_logging().

◆ logfile

char* logfile
static

Definition at line 53 of file error.c.

Referenced by G_init_logging(), and write_error().

◆ message_id

struct Counter message_id
static

Definition at line 55 of file error.c.

Referenced by G_init_logging(), and print_sentence().

◆ no_sleep

int no_sleep = TRUE
static

Definition at line 50 of file error.c.

Referenced by G_sleep_on_error(), and print_error().

◆ no_warn

int no_warn = FALSE
static

Definition at line 49 of file error.c.

Referenced by G_suppress_warnings(), and G_warning().

◆ prefix_std

char* prefix_std[3]
static

Definition at line 54 of file error.c.

Referenced by G_init_logging(), and print_error().