Answer the question
In order to leave comments, you need to log in
Why doesn't custom error class work in Gulp plugin?
Here is index.js code
var Test = require( './test.js' );
function MyPlugin( ){
var test = new Test( );
test.myProblem( );
return through2.obj( );
}
'use strict';
module.exports = Test;
function TestError( message ){
Error.call( this, message );
}
TestError.prototype = Object.create( Error.prototype );
TestError.prototype.constructor = TestError;
function Test( ){}
Test.prototype = {
constructor: Test,
myProblem: function( ){
// throw new Error( "[method myProblem]ERROR!!!" ); // так работает
throw new TestError( "[method myProblem]" ); // так нет, почему?
}
}
Answer the question
In order to leave comments, you need to log in
and so?
function TestError( message ){
this.message = message;
}
TestError.prototype = Error.prototype;
1. A table is made: tbl_Order - here you have an order header, date, customer details, etc., which is not repeated.
2. A table is made: tbl_OrderDetail - id, id_order, id_product
Everything, any number of goods in the order and a minimum of duplicate fields, and they are int.
offers
id, name, ...
orders
id, ...
order_items
id, order_id, offer_id, ...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question