Skip to content

Better Error handling #71

@ManoloTonto1

Description

@ManoloTonto1

I ran into an issue that my calendar did not have a getAllDayEndAt() property and I got an error which was property not found
I think it would be great to have a package with all the possible errors so we can better handle errors in production.

func (event *VEvent) getTimeProp(componentProperty ComponentProperty, expectAllDay bool) (time.Time, error) {
	timeProp := event.GetProperty(componentProperty)
	if timeProp == nil {
		return time.Time{}, errors.New("property not found")
	}

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions