ns_string_wrapper! {
#[derive(Ord, PartialOrd, Eq, PartialEq)]
pub wrapper NSExceptionName;
}
macro_rules! name {
(
$(#[$docs:meta])+
$fn:ident $value:literal
) => {
$(#[$docs])+
#[inline]
#[doc(alias = $value)]
pub fn $fn() -> &'static NSExceptionName {
extern "C" {
#[link_name = $value]
static VALUE: &'static NSExceptionName;
}
unsafe { VALUE }
}
};
}
impl NSExceptionName {
name! {
generic "NSGenericException"
}
name! {
internal_inconsistency "NSInternalInconsistencyException"
}
name! {
invalid_argument "NSInvalidArgumentException"
}
}
impl NSExceptionName {
name! {
character_conversion "NSCharacterConversionException"
}
name! {
parse_error "NSParseErrorException"
}
}
impl NSExceptionName {
name! {
decimal_number_exactness "NSDecimalNumberExactnessException"
}
name! {
decimal_number_overflow "NSDecimalNumberOverflowException"
}
name! {
decimal_number_underflow "NSDecimalNumberUnderflowException"
}
name! {
decimal_number_divide_by_zero "NSDecimalNumberDivideByZeroException"
}
}
impl NSExceptionName {
name! {
file_handle_operation "NSFileHandleOperationException"
}
}
impl NSExceptionName {
name! {
invocation_operation_cancelled "NSInvocationOperationCancelledException"
}
name! {
invocation_operation_void_result "NSInvocationOperationVoidResultException"
}
}
impl NSExceptionName {
name! {
inconsistent_archive "NSInconsistentArchiveException"
}
}
impl NSExceptionName {
name! {
invalid_archive_operation "NSInvalidArchiveOperationException"
}
name! {
invalid_unarchive_operation "NSInvalidUnarchiveOperationException"
}
}
impl NSExceptionName {
name! {
port_receive "NSPortReceiveException"
}
name! {
port_send "NSPortSendException"
}
name! {
port_timeout "NSPortTimeoutException"
}
}
impl NSExceptionName {
name! {
range "NSRangeException"
}
}
impl NSExceptionName {
name! {
undefined_key "NSUndefinedKeyException"
}
}
impl NSExceptionName {
name! {
destination_invalid "NSDestinationInvalidException"
}
name! {
invalid_receive_port "NSInvalidReceivePortException"
}
name! {
invalid_send_port "NSInvalidSendPortException"
}
name! {
object_inaccessible "NSObjectInaccessibleException"
}
name! {
object_not_available "NSObjectNotAvailableException"
}
}
#[cfg(feature = "app_kit")]
impl NSExceptionName {
name! {
text_line_too_long "NSTextLineTooLongException"
}
name! {
text_no_selection "NSTextNoSelectionException"
}
name! {
word_tables_write "NSWordTablesWriteException"
}
name! {
word_tables_read "NSWordTablesReadException"
}
name! {
text_read "NSTextReadException"
}
name! {
text_write "NSTextWriteException"
}
name! {
pasteboard_communication "NSPasteboardCommunicationException"
}
name! {
printing_communication "NSPrintingCommunicationException"
}
name! {
abort_modal "NSAbortModalException"
}
name! {
abort_printing "NSAbortPrintingException"
}
name! {
illegal_selector "NSIllegalSelectorException"
}
name! {
app_kit_virtual_memory "NSAppKitVirtualMemoryException"
}
name! {
bad_rtf_directive "NSBadRTFDirectiveException"
}
name! {
bad_rtf_font_table "NSBadRTFFontTableException"
}
name! {
bad_rtf_style_sheet "NSBadRTFStyleSheetException"
}
name! {
typed_stream_version "NSTypedStreamVersionException"
}
name! {
tiff "NSTIFFException"
}
name! {
print_package "NSPrintPackageException"
}
name! {
bad_rtf_color_table "NSBadRTFColorTableException"
}
name! {
dragging "NSDraggingException"
}
name! {
color_list_io "NSColorListIOException"
}
name! {
color_list_not_editable "NSColorListNotEditableException"
}
name! {
bad_bitmap_parameters "NSBadBitmapParametersException"
}
name! {
window_server_communication "NSWindowServerCommunicationException"
}
name! {
font_unavailable "NSFontUnavailableException"
}
name! {
ppd_include_not_found "NSPPDIncludeNotFoundException"
}
name! {
ppd_parse "NSPPDParseException"
}
name! {
ppd_include_stack_overflow "NSPPDIncludeStackOverflowException"
}
name! {
ppd_include_stack_underflow "NSPPDIncludeStackUnderflowException"
}
name! {
rtf_property_stack_overflow "NSRTFPropertyStackOverflowException"
}
name! {
app_kit_ignored "NSAppKitIgnoredException"
}
name! {
bad_comparison "NSBadComparisonException"
}
name! {
image_cache "NSImageCacheException"
}
name! {
nib_loading "NSNibLoadingException"
}
name! {
browser_illegal_delegate "NSBrowserIllegalDelegateException"
}
name! {
accessibility "NSAccessibilityException"
}
name! {
print_operation_exists "NSPrintOperationExistsException"
}
}
#[cfg(feature = "ui_kit")]
impl NSExceptionName {
name! {
ui_application_invalid_interface_orientation "UIApplicationInvalidInterfaceOrientationException"
}
name! {
ui_view_controller_hierarchy_inconsistency "UIViewControllerHierarchyInconsistencyException"
}
}