fixup promise inheritance.
set CustomError's constructor