How can I create Rules condition for event when 404 error generated? I've assigned page for 404 error handling (example.com/404).
I've created Rules condition: Data to compare: [site:current-page:url], Data value: 404.
And I've created some Rules action for this case.

But when I open nonexistent page (example.com/wrong) - there is no corresponding Rules action.
It is because I see 'example.com/wrong' address instead of 'example.com/404'

But how can I create Rules condition for event when 404 error generated?
Navigate to this path admin/config/system/site-information, which will look like www.example.com/admin/config/system/site-information.

Enter the page URL(your page for 404) in the 'Default 404 (not found) page', where you want to navigate your user when 404 happens.

Note - I don't think you can detect 404 from rules. May be somebody can answer about that but not me. Though I have experience with rules but never seen this kind of thing.