标签: runtime-error

"删除这个"是否安全?

在我最初的基本测试中,这样做是完全安全的.然而,它已经让我吃惊试图操纵this该功能后delete小号this可能是一个运行时错误.这是真的,通常是安全的delete this吗?或者只有某些安全的情况?

c++ runtime-error self-destruction

33
推荐指数
5
解决办法
3万
查看次数

Haskell 中的“修复”是什么?为什么“修复错误”会打印无限字符串?为什么“拿 10 美元修复错误”也有同样的作用?

长话短说,我正在观看Simon Peyton-Jones 的演讲,当时21:41他引用了一段话:

\n
\n

我正在解决一个错误,感到沮丧,并在 ghci\xe2\x80\xa6 中输入“修复错误”

\n
\n

所以我尝试了。

\n

结果:

\n
\xce\xbb> import Data.Function -- here is fix\n\xce\xbb> fix error\n"*** Exception: *** Exception: *** Exception: *** Exception: *** Exception: *** Exception: *** Exception: *** Exception: *** Exception: *** Exception: *** Exception: *** Exception: *** Exception: *** Exception: *** Exception: *** Exception: *** Exception: *** Exception: *** Exception: *** Exception: *** Exception: *** Exception: *** Exception: *** Exception: *** Exception: *** Exception: *** Exception: …
Run Code Online (Sandbox Code Playgroud)

haskell functional-programming runtime-error exception

33
推荐指数
2
解决办法
3723
查看次数

每次我尝试运行app时,"RuntimeError:generator raise StopIteration"

我正在尝试运行此代码:

import web

urls = (
    '/', 'index'
)

if __name__ == "__main__":
    app = web.application(urls, globals())
    app.run()
Run Code Online (Sandbox Code Playgroud)

但它每次都给我这个错误

C:\Users\aidke\Desktop>python app.py
Traceback (most recent call last):
  File "C:\Users\aidke\AppData\Local\Programs\Python\Python37-32\lib\site-packages\web\utils.py", line 526, in take
    yield next(seq)
StopIteration

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "app.py", line 14, in <module>
    app = web.application(urls, globals())
  File "C:\Users\aidke\AppData\Local\Programs\Python\Python37-32\lib\site-packages\web\application.py", line 62, in __init__
    self.init_mapping(mapping)
  File "C:\Users\aidke\AppData\Local\Programs\Python\Python37-32\lib\site-packages\web\application.py", line 130, in init_mapping
    self.mapping = list(utils.group(mapping, 2))
  File "C:\Users\aidke\AppData\Local\Programs\Python\Python37-32\lib\site-packages\web\utils.py", …
Run Code Online (Sandbox Code Playgroud)

python runtime-error helper web stopiteration

32
推荐指数
1
解决办法
2万
查看次数

无法找到类型[System.IO.Compression.CompressionLevel],请确保已加载包含此类型的程序集

我编写了这个PowerShell脚本,该脚本应该在特定日期范围内存档所有日志文件.

$currentDate = Get-Date;
$currentDate | Get-Member -Membertype Method Add;
$daysBefore = -1;
$archiveTillDate = $currentDate.AddDays($daysBefore);

$sourcePath = 'C:\LOGS';
$destPath='C:\LogArchieve\_'+$archiveTillDate.Day+$archiveTillDate.Month+$archiveTillDate.Year+'.zip';

foreach( $item in (Get-ChildItem $sourcePath | Where-Object { $_.CreationTime -le $archiveTillDate }) )
{
    [Reflection.Assembly]::LoadWithPartialName("System.IO.Compression.FileSystem");
    $compressionLevel = [System.IO.Compression.CompressionLevel]::Optimal;
    [System.IO.Compression.ZipFile]::CreateFromDirectory($sourcePath,$destPath, $compressionLevel, $false);
}
Run Code Online (Sandbox Code Playgroud)

它一直工作到foreach循环之前,但是在循环中它会产生以下错误:

Unable to find type [System.IO.Compression.CompressionLevel]: make sure that the assembly containing this type is loaded.
At line:4 char:65
+ $compressionLevel = [System.IO.Compression.CompressionLevel] <<<< ::Optimal;
+ CategoryInfo          : InvalidOperation: (System.IO.Compression.CompressionLevel:String) [], RuntimeException
+ FullyQualifiedErrorId : TypeNotFound …
Run Code Online (Sandbox Code Playgroud)

compression powershell runtime-error powershell-2.0 .net-assembly

31
推荐指数
2
解决办法
5万
查看次数

android.util.AndroidRuntimeException:您无法组合滑动解雇和操作栏

我是android编程的新手并开始了一个示例hello world程序,但是遇到了以下错误:

07-05 13:52:20.830: W/dalvikvm(898): threadid=1: thread exiting with uncaught exception (group=0xb2ac4d70)
07-05 13:52:20.850: E/AndroidRuntime(898): FATAL EXCEPTION: main
07-05 13:52:20.850: E/AndroidRuntime(898): Process: com.example.helloandroid, PID: 898
07-05 13:52:20.850: E/AndroidRuntime(898): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.helloandroid/com.example.helloandroid.MainActivity}: android.util.AndroidRuntimeException: You cannot combine swipe dismissal and the action bar.
07-05 13:52:20.850: E/AndroidRuntime(898):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2197)
07-05 13:52:20.850: E/AndroidRuntime(898):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2258)
07-05 13:52:20.850: E/AndroidRuntime(898):  at android.app.ActivityThread.access$800(ActivityThread.java:138)
07-05 13:52:20.850: E/AndroidRuntime(898):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1209)
07-05 13:52:20.850: E/AndroidRuntime(898):  at android.os.Handler.dispatchMessage(Handler.java:102)
07-05 13:52:20.850: E/AndroidRuntime(898):  at android.os.Looper.loop(Looper.java:136)
07-05 13:52:20.850: E/AndroidRuntime(898):  at android.app.ActivityThread.main(ActivityThread.java:5026)
07-05 …
Run Code Online (Sandbox Code Playgroud)

android runtime-error

31
推荐指数
4
解决办法
3万
查看次数

活动没叫完?(API 23)

我收到以下错误,我不知道为什么会发生这种情况.

错误:

08-23 17:07:46.533  22454-22454/com.a.b.c E/AndroidRuntime? FATAL EXCEPTION: main
    Process: com.a.b.c, PID: 22454
    java.lang.RuntimeException: Unable to resume activity {com.a.b.c/com.a.b.c.MainActivity}: java.lang.IllegalStateException: Activity {com.a.b.c/com.a.b.c.MainActivity} did not call finish() prior to onResume() completing
            at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3103)
            at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3134)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2481)
            at android.app.ActivityThread.-wrap11(ActivityThread.java)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:148)
            at android.app.ActivityThread.main(ActivityThread.java:5417)
            at java.lang.reflect.Method.invoke(Native Method)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
     Caused by: java.lang.IllegalStateException: Activity {com.a.b.c/com.a.b.c.MainActivity} did not call finish() prior to onResume() completing
            at android.app.Activity.performResume(Activity.java:6324)
            at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3092)
            at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3134)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2481)
            at android.app.ActivityThread.-wrap11(ActivityThread.java)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
            at android.os.Handler.dispatchMessage(Handler.java:102) …
Run Code Online (Sandbox Code Playgroud)

android runtime-error android-lifecycle android-6.0-marshmallow

31
推荐指数
5
解决办法
1万
查看次数

PHP生成的XML显示无效的Char值27消息

我使用PHP库生成XML,如下所示:

$dom = new DOMDocument("1.0","utf-8");
Run Code Online (Sandbox Code Playgroud)

执行上述操作会在页面中显示输出顶部的消息.

此页面包含以下错误:第274行第274505行的错误:PCDATA无效字符值27下面是第一个错误之前的页面呈现.

我尝试使用Tidy库进行纠正..使用iconv来获取UTF-8中的中文字符.

php runtime-error tidy character-encoding xml-parsing

30
推荐指数
2
解决办法
3万
查看次数

Android Device Monitor无法打开 - 日志文件出错

在Android Studio中,当我尝试运行Android Device Monitor时,我在日志文件中收到以下错误:

    >!SESSION 2014-12-17 09:57:30.625 -----------------------------------------------
    eclipse.buildId=unknown
    java.version=1.8.0_25
    java.vendor=Oracle Corporation
    BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=pt_BR
    Command-line arguments:  -os win32 -ws win32 -arch x86_64 -data @noDefault

    >!ENTRY org.eclipse.osgi 4 0 2014-12-17 09:57:31.366
    !MESSAGE Bundle reference:file:org.apache.ant_1.8.3.v201301120609/@4 not found.

    >!ENTRY org.eclipse.osgi 4 0 2014-12-17 09:57:31.372
    !MESSAGE Bundle reference:file:org.apache.jasper.glassfish_2.2.2.v201205150955.jar@4
Run Code Online (Sandbox Code Playgroud)

未找到.

    >!ENTRY org.eclipse.osgi 4 0 2014-12-17 09:57:31.373
    !MESSAGE Bundle reference:file:org.apache.lucene.core_2.9.1.v201101211721.jar@4 not
Run Code Online (Sandbox Code Playgroud)

找到.

    >!ENTRY org.eclipse.osgi 4 0 2014-12-17 09:57:31.439
    !MESSAGE Bundle reference:file:org.eclipse.help.base_3.6.101.v201302041200.jar@4 not
Run Code Online (Sandbox Code Playgroud)

找到.

    >!ENTRY org.eclipse.osgi 4 0 2014-12-17 09:57:31.439
    !MESSAGE Bundle reference:file:org.eclipse.help.ui_3.5.201.v20130108-092756.jar@4 …
Run Code Online (Sandbox Code Playgroud)

android runtime-error ddms android-studio

30
推荐指数
4
解决办法
7万
查看次数

PostgreSQL无法在PL/pgSQL中开始/结束事务

我正在寻求澄清如何在plpgsql函数中确保原子事务,以及为数据库的这个特定更改设置隔离级别.

在下面显示的plpgsql函数中,我想确保删除和插入成功.当我尝试将它们包装在一个事务中时,我收到一个错误:
ERROR: cannot begin/end transactions in PL/pgSQL.

如果另一个用户此功能删除了自定义行之后但有机会插入自定义行之前添加了环境的默认行为('RAIN','NIGHT','45MPH'),则执行下面的函数时会发生什么?行?是否存在包含插入和删除的隐式事务,以便在另一个用户更改此函数引用的任一行时回滚它们?我可以为此功能设置隔离级别吗?

create function foo(v_weather varchar(10), v_timeofday varchar(10), v_speed varchar(10),
   v_behavior varchar(10))
   returns setof CUSTOMBEHAVIOR
   as $body$
   begin

      -- run-time error if either of these lines is un-commented

      -- start transaction ISOLATION LEVEL READ COMMITTED;
      -- or, alternatively, set transaction ISOLATION LEVEL READ COMMITTED;


      delete from CUSTOMBEHAVIOR 
      where weather = 'RAIN' and timeofday = 'NIGHT' and speed= '45MPH' ;

      -- if there is no default behavior …
Run Code Online (Sandbox Code Playgroud)

transactions runtime-error plpgsql read-committed postgresql-9.2

29
推荐指数
1
解决办法
3万
查看次数

清单合并失败:针对 Android 12 的应用程序 - Android Studio 错误

首先,这不是重复的。

我已将模拟器版本和 android SDK 版本更新为 Android S (Android 12) 但更新后。我无法运行该项目。我无法运行 hello world 项目(空项目)。但是我可以构建成绩,但不能运行该项目。我总是收到错误:

***Manifest merger failed: Apps targeting Android 12 and higher are required to specify an explicit value for `android: exported` when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details.***
Run Code Online (Sandbox Code Playgroud)

请任何人都可以帮助我吗?

这是一个截图...

这是一个截图。

java android runtime-error android-emulator android-studio

29
推荐指数
8
解决办法
2万
查看次数