mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-20 23:52:40 +08:00
Use cc.errorID instead of console.error
This commit is contained in:
@@ -621,6 +621,10 @@ if (CC_DEBUG) {
|
||||
"8301": "Camera does not support Canvas Mode.", //cc.Camera.enabled
|
||||
// AudioEngine: 8400
|
||||
"8400": "Wrong type arguments, 'filePath' must be a String.", // cc.audioEngine.play
|
||||
|
||||
// New Renderer 10000
|
||||
"9000": "Stencil manager does not support level bigger than %d in this device.",
|
||||
"9001": "Stencil manager is already empty, cannot pop any mask",
|
||||
};
|
||||
cc._LogInfos = logs;
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ StencilManager.prototype = {
|
||||
|
||||
pushMask (mask) {
|
||||
if (this._maskStack.length + 1 > this._maxLevel) {
|
||||
console.error(`Stencil manager does not support level bigger than ${this._maxLevel} in this device.`);
|
||||
cc.errorID(9000, this._maxLevel);
|
||||
}
|
||||
this._maskStack.push(mask);
|
||||
this.stage = Stage.ENTER_LEVEL;
|
||||
@@ -97,7 +97,7 @@ StencilManager.prototype = {
|
||||
|
||||
popMask () {
|
||||
if (this._maskStack.length === 0) {
|
||||
console.error(`Stencil manager is already empty, cannot pop any mask`);
|
||||
cc.errorID(9001);
|
||||
}
|
||||
this._maskStack.pop();
|
||||
this.stage = Stage.EXIT_LEVEL;
|
||||
|
||||
Reference in New Issue
Block a user