Issue 73782 - replace TODOs in rtl/uuid.cxx with better comments
Summary: replace TODOs in rtl/uuid.cxx with better comments
Status: CLOSED FIXED
Alias: None
Product: porting
Classification: Code
Component: code (show other issues)
Version: current
Hardware: All All
: P3 Trivial (vote)
Target Milestone: OOo 2.3
Assignee: Stephan Bergmann
QA Contact: issues@porting
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-23 08:08 UTC by Stephan Bergmann
Modified: 2007-03-20 10:39 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Stephan Bergmann 2007-01-23 08:08:01 UTC
sal/rtl/source/uuid.cxx:1.11 l. 120, 124 both contain

  abort(); //TODO

The TODO comment is misleading:  As rtl_createUuid is a C function it must not
throw, and as it is part of a stable API its signature cannot be changed so it
cannot communicate failure.  So it can only abort in case of a fatal error.

Improve the code by stating that explicitly.
Comment 1 Stephan Bergmann 2007-01-23 08:08:30 UTC
.
Comment 2 mmeeks 2007-01-24 10:14:07 UTC
Would a new API that includes error handling in addition, and some deprecation
be a good approach ?
Comment 3 Stephan Bergmann 2007-01-24 10:30:07 UTC
Probably not worth it.  If the random stuff does not work probably something
very fundamental is going wrong (or we are out of memory, which OOo cannot
handle graceful either), so any better recovery than abort() is probably not
possible, anyway.
Comment 4 Stephan Bergmann 2007-01-24 10:56:50 UTC
.
Comment 5 Stephan Bergmann 2007-01-30 16:01:31 UTC
.
Comment 6 Stephan Bergmann 2007-03-20 10:39:32 UTC
.