Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
gstreamer
gstreamer
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 405
    • Issues 405
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 80
    • Merge Requests 80
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • GStreamer
  • gstreamergstreamer
  • Issues
  • #632

Closed
Open
Opened Nov 05, 2020 by Sebastian Dröge@slomo🍵Owner0 of 1 task completed0/1 task

datetime: Do date validation inside constructors instead of asserting and having user code deal with it

The following discussion from !678 (merged) should be addressed:

  • @slomo started a discussion: (+7 comments)

    All the constructors can fail in certain situations. And IMHO we should also make the constraints for the years/etc normal errors instead of g_return_val_if_fail(). @tpm ?


See more discussion over there. In short: we already do the checks anyway and date handling code is difficult and we should let user code worry about that. For some validation errors we already return NULL gracefully, for others we assert. Goal is to return NULL gracefully in general and document that this is the case since 1.20.

Assignee
Assign to
1.19.1
Milestone
1.19.1
Assign milestone
Time tracking
None
Due date
None
Reference: gstreamer/gstreamer#632