For instance I use a array “error ” to contain all of error I find then use several function to deal that.
at the first I add an function that throw the error as the final solution.
But when during some certain proess , some error can be expect and can be made up such as network failed, so I want to add a new watch function to deal this special case first. In consideration of this may dynamic decided by certain input , so it can't declare before that final solution .
So, I wonder if there a way to control those order of watching function , I think a simple "add to head","add to tail" will be great.
thanks
For instance I use a array “error ” to contain all of error I find then use several function to deal that. at the first I add an function that throw the error as the final solution. But when during some certain proess , some error can be expect and can be made up such as network failed, so I want to add a new watch function to deal this special case first. In consideration of this may dynamic decided by certain input , so it can't declare before that final solution . So, I wonder if there a way to control those order of watching function , I think a simple "add to head","add to tail" will be great. thanks