2016-03-13 15:15:56 +01:00
|
|
|
// Objective-C API for talking to ignore Go package.
|
|
|
|
// gobind -lang=objc ignore
|
|
|
|
//
|
|
|
|
// File is generated by gobind. Do not edit.
|
|
|
|
|
|
|
|
#ifndef __GoIgnore_H__
|
|
|
|
#define __GoIgnore_H__
|
|
|
|
|
|
|
|
#include <Foundation/Foundation.h>
|
mobile/bind: use objects to pass errors across the language barrier
Gobind uses strings for passing errors across the language barrier.
However, since Gobind doesn't have a concept of a nil string, it
can't separate an empty native string from a nil string.
In turn, that means that empty errors, exceptions or NSError * with
an empty description are treated as no error. With ObjC, empty errors
are replaced with a default string to workaround the issue, while
with Java empty errors are silently ignored.
Fix this by replacing strings with actual error objects, wrapping
the Go error, Java Throwable or ObjC NSError *, and letting the
existing bind machinery take care of passing the references across.
It's a large change for a small corner case, but I believe objects
are a better fit for exception that strings. Error objects also
naturally leads to future additions, for example accessing the
exception class name or chained exception.
Change-Id: Ie03b47cafcb231ad1e12a80195693fa7459c6265
Reviewed-on: https://go-review.googlesource.com/24100
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2016-06-14 11:58:31 +02:00
|
|
|
#include "GoUniverse.h"
|
2016-03-13 15:15:56 +01:00
|
|
|
|
|
|
|
@class GoIgnoreS;
|
|
|
|
@protocol GoIgnoreI;
|
|
|
|
@class GoIgnoreI;
|
|
|
|
|
|
|
|
@interface GoIgnoreS : NSObject {
|
|
|
|
}
|
|
|
|
@property(strong, readonly) id _ref;
|
|
|
|
|
|
|
|
- (id)initWithRef:(id)ref;
|
|
|
|
// skipped field S.F with unsupported type: *types.Interface
|
|
|
|
|
|
|
|
// skipped method S.Argument with unsupported parameter or return types
|
|
|
|
|
|
|
|
// skipped method S.Result with unsupported parameter or return types
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
@protocol GoIgnoreI
|
|
|
|
// skipped method I.Argument with unsupported parameter or return types
|
|
|
|
|
|
|
|
// skipped method I.Result with unsupported parameter or return types
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
// skipped const NamedConst with unsupported type: *types.Const
|
|
|
|
|
|
|
|
|
|
|
|
@interface GoIgnore : NSObject
|
|
|
|
// skipped variable V with unsupported type: *types.Interface
|
|
|
|
|
|
|
|
// skipped variable Var with unsupported type: *types.Interface
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
// skipped function Argument with unsupported parameter or return types
|
|
|
|
|
|
|
|
|
|
|
|
// skipped function Result with unsupported parameter or return types
|
|
|
|
|
|
|
|
|
|
|
|
@class GoIgnoreI;
|
|
|
|
|
|
|
|
@interface GoIgnoreI : NSObject <GoIgnoreI> {
|
|
|
|
}
|
|
|
|
@property(strong, readonly) id _ref;
|
|
|
|
|
2016-09-19 12:44:13 +02:00
|
|
|
- (instancetype)initWithRef:(id)ref;
|
2016-03-13 15:15:56 +01:00
|
|
|
// skipped method I.Argument with unsupported parameter or return types
|
|
|
|
|
2016-06-14 18:15:23 +02:00
|
|
|
// skipped method I.Result with unsupported parameter or return types
|
|
|
|
|
|
|
|
@end
|
2016-03-13 15:15:56 +01:00
|
|
|
|
|
|
|
#endif
|