---
title: "raiseBadArgumentException(_:_:_:)"
framework: appkit
role: symbol
role_heading: Type Method
path: "appkit/nsaccessibility-swift.struct/raisebadargumentexception(_:_:_:)"
---

# raiseBadArgumentException(_:_:_:)

Raises an error if the parameter is the wrong type or has an illegal value

## Declaration

```swift
static func raiseBadArgumentException(_ element: Any!, _ attribute: NSAccessibility.Attribute!, _ value: Any!)
```

## Discussion

Discussion Raises an error if a parameter is the wrong type or has an illegal value. This function can also be used to raise an error if an attempt is made to set an attribute’s value with the wrong type or an illegal value.

## See Also

### Functions

- [NSConvertGlyphsToPackedGlyphs(_:_:_:_:)](appkit/nsconvertglyphstopackedglyphs(_:_:_:_:).md)
- [NSReleaseAlertPanel(_:)](appkit/nsreleasealertpanel(_:).md)
- [NSDisableScreenUpdates()](appkit/nsdisablescreenupdates().md)
- [NSEnableScreenUpdates()](appkit/nsenablescreenupdates().md)
- [NSDrawColorTiledRects(_:_:_:_:_:)](appkit/nsdrawcolortiledrects(_:_:_:_:_:).md)
- [NSSetShowsServicesMenuItem(_:_:)](appkit/nssetshowsservicesmenuitem(_:_:).md)
- [NSCopyBits(_:_:_:)](appkit/nscopybits(_:_:_:).md)
- [NSShowsServicesMenuItem(_:)](appkit/nsshowsservicesmenuitem(_:).md)
- [NSDottedFrameRect(_:)](appkit/nsdottedframerect(_:).md)
- [NSReadPixel(_:)](appkit/nsreadpixel(_:).md)
- [NSGetWindowServerMemory(_:_:_:_:)](appkit/nsgetwindowservermemory(_:_:_:_:).md)
- [fileContentsType(forPathExtension:)](appkit/nspasteboard/pasteboardtype/filecontentstype(forpathextension:).md)
- [fileNameType(forPathExtension:)](appkit/nspasteboard/pasteboardtype/filenametype(forpathextension:).md)
- [representedPathExtension](appkit/nspasteboard/pasteboardtype/representedpathextension.md)
- [representedPathExtensions(from:)](appkit/nspasteboard/pasteboardtype/representedpathextensions(from:).md)
