magickGetException method

MagickGetExceptionResult magickGetException()

Returns the severity, reason, and description of any error that occurs when using other methods with this wand. For example, failure to read an image using magickReadImage will cause an exception to be associated with this wand and which can be retrieved by this method.

  • Note: if no exception has occurred, UndefinedExceptionType is returned.

Implementation

MagickGetExceptionResult magickGetException() => using((Arena arena) {
      final Pointer<Int32> severity = arena();
      final Pointer<Char> description =
          _magickWandBindings.MagickGetException(_wandPtr, severity);
      final MagickGetExceptionResult magickGetExceptionResult =
          MagickGetExceptionResult(
        ExceptionType.fromValue(severity.value),
        description.toNullableString()!,
      );
      _magickRelinquishMemory(description.cast());
      return magickGetExceptionResult;
    });