Summary: enforceEx cannot be used with OutOfMemoryError
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos

--- Comment #0 from Jakob Ovrum <> 2012-07-18 02:50:51 PDT 
This idiom would be quite useful to have:

    auto data = enforceEx!OutOfMemoryError(malloc(size));

However, OutOfMemoryError only provides this constructor:

   this(string file = __FILE__, size_t line = __LINE__, Throwable next = null )

I think enforceEx is at fault here, not OutOfMemoryError. The non-deprecated
overload of enforceEx should allow for constructors of the above form,
requiring the file and line but providing its own messsage.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to