Contents

PMSessionSetError(_:_:)

Sets the value of the current result code for the specified printing session.

Declaration

func PMSessionSetError(_ printSession: PMPrintSession, _ printError: OSStatus) -> OSStatus

Parameters

  • printSession:

    The printing session whose result code you want to set.

  • printError:

    The result code you want to set. This result code is returned by the PMSessionError function.

Return Value

A result code. See Result Codes.

Discussion

You must call this function between the creation and release of a printing session. See the function PMCreateSession(_:).

You can use this function to terminate a printing session if your application encounters any errors inside the print loop. Typically, this function is used by an application’s idle function. The idle function isn’t called in macOS, so this usage is not available.

See Also

Accessing Data in Printing Session Objects