Add baseline documentation, error domain, and generic exception type
git-svn-id: https://plcrashreporter.googlecode.com/svn/trunk@13 25172300-ee46-11dd-abe2-393a09110dd0
This commit is contained in:
Родитель
ab3aeabdd7
Коммит
520445d431
|
@ -2,6 +2,8 @@
|
|||
# CrashReporter
|
||||
#
|
||||
# Created by Landon Fuller on 12/5/08.
|
||||
# Copyright 2008 __MyCompanyName__. All rights reserved.
|
||||
|
||||
# Copyright 2008 Plausible Labs Cooperative, Inc. All rights reserved.
|
||||
|
||||
# CrashReporter
|
||||
_PLCrashReporterException
|
||||
_PLCrashReporterErrorDomain
|
|
@ -7,9 +7,81 @@
|
|||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/* Dependencies */
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface CrashReporter : NSObject {
|
||||
#ifdef __APPLE__
|
||||
#import <AvailabilityMacros.h>
|
||||
#endif
|
||||
|
||||
}
|
||||
/**
|
||||
* @defgroup functions Crash Reporter Functions Reference
|
||||
*/
|
||||
|
||||
@end
|
||||
/**
|
||||
* @defgroup constants Crash Reporter Constants Reference
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup enums Enumerations
|
||||
* @ingroup constants
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup globals Global Variables
|
||||
* @ingroup constants
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup exceptions Exceptions
|
||||
* @ingroup constants
|
||||
*/
|
||||
|
||||
/* Exceptions */
|
||||
extern NSString *PLCrashReporterException;
|
||||
|
||||
/* Error Domain and Codes */
|
||||
extern NSString *PLCrashReporterErrorDomain;
|
||||
|
||||
/**
|
||||
* NSError codes in the Plausible Crash Reporter error domain.
|
||||
* @ingroup enums
|
||||
*/
|
||||
typedef enum {
|
||||
/** An unknown error has occured. If this
|
||||
* code is received, it is a bug, and should be reported. */
|
||||
PLCrashReporterErrorUnknown = 0
|
||||
} PLCrashReporterError;
|
||||
|
||||
/**
|
||||
* @mainpage Plausible Crash Reporter
|
||||
*
|
||||
* @section intro_sec Introduction
|
||||
*
|
||||
* Library classes supporting subclassing are explicitly documented. Due to =
|
||||
* Objective-C's fragile base classes, binary compatibility with subclasses is
|
||||
* NOT guaranteed. You should avoid subclassing library classes -- use class composition instead.
|
||||
*
|
||||
*
|
||||
* @section doc_sections Documentation Sections
|
||||
* - @subpage error_handling
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @page error_handling Error Handling Programming Guide
|
||||
*
|
||||
* Where a method may return an error, Plausible Crash Reporter provides access to the underlying
|
||||
* cause via an optional NSError argument.
|
||||
*
|
||||
* All returned errors will be a member of one of the below defined domains, however, new domains and
|
||||
* error codes may be added at any time. If you do not wish to report on the error cause, many methods
|
||||
* support a simple form that requires no NSError argument.
|
||||
*
|
||||
* @section Error Domains, Codes, and User Info
|
||||
*
|
||||
* @subsection crashreporter_errors Crash Reporter Errors
|
||||
*
|
||||
* Any errors in Plausible Crash Reporter use the #PLCrashReporterErrorDomain error domain, and and one
|
||||
* of the error codes defined in #PLCrashReporterError.
|
||||
*/
|
||||
|
|
|
@ -7,7 +7,12 @@
|
|||
|
||||
#import "CrashReporter.h"
|
||||
|
||||
/**
|
||||
* Generic CrashReporter Exception
|
||||
* @ingroup exceptions
|
||||
*/
|
||||
NSString *PLCrashReporterException = @"PLCrashReporterException";
|
||||
|
||||
@implementation CrashReporter
|
||||
|
||||
@end
|
||||
/** Plausible Database NSError Domain
|
||||
* @ingroup globals */
|
||||
NSString *PLCrashReporterErrorDomain = @"PLCrashReporterErrorDomain";
|
||||
|
|
Загрузка…
Ссылка в новой задаче