-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More improvements on field returns for failure
- Loading branch information
Showing
3 changed files
with
71 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,58 @@ | ||
var util = require('util'); | ||
|
||
var AvroIOError = function() { | ||
Error.call(this); | ||
var AvroIOError = function() { | ||
Error.call(this); | ||
this.name = 'Avro IO Error'; | ||
this.message = util.format.apply(null, arguments); | ||
Error.captureStackTrace(this, arguments.callee); | ||
}; | ||
}; | ||
|
||
var AvroFileError = function() { | ||
Error.call(this); | ||
var AvroFileError = function() { | ||
Error.call(this); | ||
this.name = 'Avro File Error'; | ||
this.message = util.format.apply(null, arguments); | ||
Error.captureStackTrace(this, arguments.callee); | ||
}; | ||
var AvroBlockError = function() { | ||
Error.call(this); | ||
}; | ||
|
||
var AvroBlockError = function() { | ||
Error.call(this); | ||
this.name = 'Avro Block Error'; | ||
this.message = util.format.apply(null, arguments); | ||
Error.captureStackTrace(this, arguments.callee); | ||
}; | ||
}; | ||
|
||
var AvroBlockDelayReadError = function() { | ||
Error.call(this); | ||
var AvroBlockDelayReadError = function() { | ||
Error.call(this); | ||
this.name = 'Avro Block Delay Read Error'; | ||
this.message = util.format.apply(null, arguments); | ||
Error.captureStackTrace(this, arguments.callee); | ||
}; | ||
}; | ||
|
||
var AvroInvalidSchemaError = function() { | ||
Error.call(this); | ||
var AvroInvalidSchemaError = function() { | ||
Error.call(this); | ||
this.name = 'Avro Invalid Schema Error'; | ||
this.message = util.format.apply(null, arguments); | ||
Error.captureStackTrace(this, arguments.callee); | ||
}; | ||
}; | ||
|
||
var AvroDataValidationError = function() { | ||
Error.call(this); | ||
this.name = 'Avro Data Validation Error'; | ||
this.message = util.format.apply(null, arguments); | ||
this.fieldPath = []; | ||
Error.captureStackTrace(this, arguments.callee); | ||
}; | ||
|
||
util.inherits(AvroIOError, Error); | ||
util.inherits(AvroFileError, Error); | ||
util.inherits(AvroBlockError, Error); | ||
util.inherits(AvroBlockDelayReadError, Error); | ||
util.inherits(AvroInvalidSchemaError, Error); | ||
util.inherits(AvroDataValidationError, Error); | ||
|
||
exports.BlockDelayReadError = AvroBlockDelayReadError; | ||
exports.BlockError = AvroBlockError; | ||
exports.IOError = AvroIOError; | ||
exports.FileError = AvroFileError; | ||
exports.BlockError = AvroBlockError; | ||
exports.BlockDelayReadError = AvroBlockDelayReadError; | ||
exports.InvalidSchemaError = AvroInvalidSchemaError; | ||
exports.IOError = AvroIOError; | ||
exports.DataValidationError = AvroDataValidationError; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters