Don't usually disagree with Mark DTM but on the 2 litre changing the cam sensor will rid both the codes. Just had both codes flag a month ago with the same symptoms and I only cleaned the cam sensor and both codes gone and car starts on the money every time.
Save yourself some money and try cleaning the camsensor first. Take off the ecotec strip (spark plug cover), remove the fan belt, the timing belt cover. Unplug the camsensor which sits at the top of the engine between the cams, undo the bolt holding it in and lift out the top of the engine. Give the metal part a good clean and it's surrounding area and mating face.
Put it back together and start the engine. The engine light will probably still be on, take it a good drive and bring the revs up to about 5000rpm in the first three gears and the light should go out and all will be well again. Fingers crossed anyway.
If you get a rev limiter at 4500rpm then it's faulty (or as Mark says change the crank sensor).
This method has worked every time I've had these codes, it appeared a couple of years back and then a couple of months ago again.
This is an easy job - far easier than changing the crank sensor so definitely a good idea to try this first.
Different symptoms......and keep an eye on your codes for a crank sensor failure!.
You need to consider what the crnak sensor and cam sensor do.
The crank sensor gives crank position to support accurate spark timing, engine rpm etc. If it fails, the engine stops....(the exception ebing the later coil per plug setups)
The cam sensor does nothing more than provide a crude indication of which cylinder is on which stroke (not possible to do this on a 4 stroke with crank sensor alone on these earlier management systems) which is used for little more than sequential fuel injection support. If it fails, the spark is not affected (DIS setup on these so waisted spark anyway) but, sequential injection can no longer be supported so the injectors are fired in banks of two and the upper rpm limit is lowered to around 4000rpm.
What you also get more often than not on a crank sensor failure is a poor signal error code from the cam snsor as the ecu is now saying....hang on a minute, that last crank pulse was no where near where the cam one was!
So, crank sensor is still the logical one to do first.......and I suspect the culprit.