mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-25 04:57:03 +00:00
A few additions for pretty printing things and getting better error messages
This commit is contained in:
+17
-1
@@ -33,6 +33,10 @@
|
||||
|
||||
@implementation CPBundle : CPObject
|
||||
{
|
||||
//properties set up in file.js
|
||||
//this.path = NULL;
|
||||
//this.info = NULL;
|
||||
//this._URIMap = { };
|
||||
}
|
||||
|
||||
+ (id)alloc
|
||||
@@ -185,13 +189,25 @@
|
||||
|
||||
- (void)connection:(CPURLConnection)aConnection didFailWithError:(CPError)anError
|
||||
{
|
||||
alert("Couldnot find bundle:" + anError)
|
||||
if ([_delegate respondsToSelector:@selector(bundle:didFailWithError:)])
|
||||
[_delegate bundle:self didFailWithError:anError];
|
||||
|
||||
CPLog.error("Could not find bundle: " + self);
|
||||
}
|
||||
|
||||
- (void)connectionDidFinishLoading:(CPURLConnection)aConnection
|
||||
{
|
||||
}
|
||||
|
||||
- (CPString)description
|
||||
{
|
||||
return [super description] + "(" + path + ")";
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
objj_bundle.prototype.isa = CPBundle;
|
||||
objj_bundle.prototype.toString = function()
|
||||
{
|
||||
return [this description];
|
||||
}
|
||||
|
||||
@@ -609,3 +609,7 @@
|
||||
@end
|
||||
|
||||
objj_dictionary.prototype.isa = CPDictionary;
|
||||
objj_bundle.prototype.toString = function()
|
||||
{
|
||||
return [this description];
|
||||
}
|
||||
|
||||
@@ -607,10 +607,10 @@ function objj_decompile(aString, bundle)
|
||||
var stream = new objj_markedStream(aString);
|
||||
|
||||
if (stream.magicNumber() != STATIC_MAGIC_NUMBER)
|
||||
objj_exception_throw(new objj_exception(OBJJUnrecognizedFormatException, "*** Could not recognize executable code format."));
|
||||
objj_exception_throw(new objj_exception(OBJJUnrecognizedFormatException, "*** Could not recognize executable code format in bundle: "+bundle));
|
||||
|
||||
if (stream.version() != 1.0)
|
||||
objj_exception_throw(new objj_exception(OBJJUnrecognizedFormatException, "*** Could not recognize executable code format."));
|
||||
objj_exception_throw(new objj_exception(OBJJUnrecognizedFormatException, "*** Could not recognize executable code format in bundle: "+bundle));
|
||||
|
||||
var file = NULL,
|
||||
files = [],
|
||||
|
||||
Reference in New Issue
Block a user