[ EDIT ]
Okay, after OP's edit, it seems I completely misunderstood the question. Nevertheless I am still leaving my answer here as someone might get some new information from it and anyway deleting it would serve little purpose.
Take a lazy language like Haskell. Define print
so that it tries
to print the value ignoring any error that occurs while printing. And there you have it, a language that behaves as described in your question.
Code example in Scala:
Welcome to Scala version 2.8.0.final (Java HotSpot(TM) Client VM, Java 1.6.0_21).
Type in expressions to have them evaluated.
Type :help for more information.
scala> import util.control.Exception._
import util.control.Exception._
scala> def print[A](x: => A) {
| ignoring(classOf[Exception]) {
| println(x)
| }
| }
print: [A](x: => A)Unit
scala> lazy val m = 1
m: Int = <lazy>
scala> lazy val n = 2 / 0
n: Int = <lazy>
scala> print(n)
scala> print(m)
1
(Note: Scala is not a lazy language by default, but supports lazy semantics optionally)