Getting the code is really important. It's the very first thing you should do.
I wonder if you've got an auto gearbox? Is there lots of white/grey smoke? It could be your DPF is trying to regen and can't. This isn't as easy or as cheap to fix, but it's fairly easy to identify. If you have a manual, don't worry about the DPF, but if you do, read on ...
If there's large amounts of white/grey smoke (but only after you're driving fast enough - it might not do it if you stay under 60km/h), try just turning off the car, wait a few seconds, and turn it on again. If the car was trying to do a regen this should stop it, although once the vehicle gets up to sufficient speed it will try again. Now you could try cleaning the DPF and the sensors or knocking out the guts of the DPF and checking the balance pipe etc etc but in many cases, the fault here is in the sensors in the DPF. They do undergo a fair bit of stress. There are three choices:
1) Replace the DPF+sensors with a new unit from Nissan. Guaranteed to fix the problem, but it's about $4K plus labour costs, and NOT the path I'd recommend because it will happen again.
2) Obtain a replacement DPF+sensors from a wrecker. It will probably fix the problem but there's no telling how long before it happens again. Only consider this if there's no other alternative before going for a new unit.
3) Obtain replacement sensors from auggie (a user of this forum, send him a private message). You can do this at the same time as hollowing out the DPF or replacing it with a DPF Delete pipe. If you want to hollow it out, you'll need some decent tools, but the result will be undetectable under inspection without disassembly. A DPF Delete pipe is obvious (and about $1100). Auggie's replacement sensors were about $600 or so, about 4 years ago I think, this might have changed. He posts out quickly and they just work, but talk to him about whether or not you should modify the DPF.
It does depend on the colour of the smoke.