If the entity you are in, runs out of its own power storage, it gives you a "power failure" warning. This message does not look at power inheriting though, you can still fire your weapon if your turret base/ship you are docked to has power remaining.
Power failure also causes power regen to stop on that entity which can be annoying.
How to reproduce:
# Spawn in this blueprint, get in the turret barrel (tab + F8): {F701}
# the barrel has 50 000 power so it should run out immediately
# fire the turret and notice the power failure message, even though your turret base + docked ship has plenty of power remaining