1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//! Debug and error handling utilities.
//!
//! This module provides panic functions for handling unsupported data
//! types and values during compression.
//!
//! # Error Handling
//!
//! These functions are called when the compression encounters invalid
//! data (like NaN or Infinity) and the configuration is set to error
//! rather than silently converting to null.
/// Panic indicating an unsupported data type encountered.
///
/// This function is called when an unknown or unsupported JSON value
/// type is encountered during compression.
///
/// # Panics
///
/// Always panics with message "unsupported data type"
!
/// Panic indicating unsupported data value with a description.
///
/// This function is called when a specific unsupported value is
/// encountered, such as NaN or Infinity when configured to error.
///
/// # Arguments
///
/// * `name` - Description of the unsupported value
///
/// # Panics
///
/// Always panics with message "unsupported data type: {name}"
///
/// # Example
///
/// ```ignore
/// // This would panic with "unsupported data type: [number NaN]"
/// throw_unsupported_data("[number NaN]");
/// ```
!