x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

怎么在自己的UE4工程里边启用异常

 我想在自己的一个ue4的C++项目exceptionTest中启用异常,发生如下情况:(UE4是用epiclauncher下载的4.21.2版本,VS2017)

1.直接在源码里加上try catch块,结果编辑器下运行时发现不能捕获抛出的异常。并且打包时出现编译错误。网上搜索后尝试以下步骤 2.在Proj.target.cs构造函数中加入this.bForceEnableExceptions=true,结果打包编译时出现编译错误,说是需要启用BuildEnvironment = TargetBuildEnvironment.Unique; 3.启用该选项后打包编译时提示 alt text 求解,怎么才能成功启用异常功能。

Product Version: UE 4.21
Tags:
捕获.png (131.3 kB)
more ▼

asked Apr 29 '19 at 03:40 AM in Chinese

avatar image

ttaw
11 2 4

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

解决了,要启用异常只需要在Build.cs里增加bEnableExceptions = true;然后使用try catch就行了。但是这样无法捕获AccessViolation之类的SEH异常,SEH异常需要使用_try _except的vc扩展才能起作用,而且这种可以不设置bEnableExceptions=true。

more ▼

answered May 03 '19 at 02:47 AM

avatar image

ttaw
11 2 4

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question