---
title: "weekCalendarPageViewController(_:didEncounterError:)"
framework: CareKit
role: symbol
role_heading: Instance Method
platforms: [iOS 13.0+, Mac Catalyst 13.0+, watchOS 7.0+]
path: "carekit/ockweekcalendarpageviewcontrollerdelegate/weekcalendarpageviewcontroller(_:didencountererror:)"
---

# weekCalendarPageViewController(_:didEncounterError:)

Notifies the delegate your app encountered an unhandled error.

## Declaration

```swift
func weekCalendarPageViewController(_ viewController: OCKWeekCalendarPageViewController, didEncounterError error: Error)
```

## Parameters

- `viewController`: The view controller that displays the calendar.
- `error`: The error that occured in the view controller.
