raise Questions

2

Solved

I am trying to raise a MouseLeftButtonDownEvent by bubbling it up the Visual tree with the following code. var args = new MouseButtonEventArgs(Mouse.PrimaryDevice,0,MouseButton.Left); args.RoutedEv...
Centro asked 10/3, 2010 at 22:56

3

Solved

I would like to know the best practice about raising an exception without arguments. In the official python documentation, you can see this : try: raise KeyboardInterrupt (http://docs.python.or...
Operator asked 12/7, 2010 at 12:43

1

Solved

What is the difference between @throw NSException and NSException raise? I wonder which one I should rather use (there is a proper use case to use one) and why?
Scan asked 14/2, 2014 at 9:27

2

Solved

I am wanting to test a function on one of my models that throws specific errors. The function looks something like this: def merge(release_to_delete) raise "Can't merge a release with itself!" if...
Greenberg asked 11/8, 2010 at 2:47

3

Solved

I'm writing a program in Ruby with a Product class. I have some exceptions raised whenever the Product is initialized with the wrong type of arguments. Is there a way I can DRY up my raised excepti...
Backset asked 27/10, 2013 at 16:43

1

Solved

I'm using custom exceptions to differ my exceptions from Python's default exceptions. Is there a way to define a custom exit code when I raise the exception? class MyException(Exception): pass ...
Hauteloire asked 28/5, 2013 at 7:46

2

Solved

I have convert class from c# to vb.net .. My point that I want to compress asp.net page to reduce the page size ,, Problem is after i convert to vb.net ,i have this error Description: An error occ...
Russ asked 16/11, 2012 at 3:38

3

Solved

Following is my code: test = 'abc' if True: raise test + 'def' And when i run this, it gives me the TypeError TypeError: exceptions must be old-style classes or derived from BaseException, not...
Bespeak asked 16/7, 2012 at 1:48

3

Solved

The rescue which could assigns a variable to reference the error object has this syntax (=>) rescue => e If rescue is the one of the general method call, what's the meaning of =>. Could...
Overtask asked 13/3, 2012 at 15:25

1

I need help with a wpf datagrid using the MVVM design pattern. I have a datagid that is bound to an observablecollection. The first column in the grid contains decimal values that cannot be edited...
Worcestershire asked 21/7, 2011 at 14:12

1

Solved

Possible Duplicate: Don't show Python raise-line in the exception stack Built in exceptions like NameError etc. give me a traceback to the point in my code where the exception occ...
Blaspheme asked 20/6, 2011 at 11:59

6

Solved

I just realized that my exceptions are not being shown to the user in my threads! At first I used this in my thread for raising the exception, which does not work: except on E:Exception do begin ...
Shih asked 26/3, 2011 at 14:36

3

Solved

I was wondering what's the proper way of raising events from C++/CLI. In C# one should first make a copy of the handler, check if it's not null, and then call it. Is there a similar practice for C+...
Exemplify asked 20/1, 2009 at 19:46

1

Solved

If you write a ruby method as a function in C that uses rb_raise, the part of the function after the call will not get excecuted and the program will stop and you will think that rb_raise used exit...
Presentative asked 29/3, 2010 at 3:0

5

Solved

If actions is a Panel, am I able to raise the Click event of it's parent? I have this code at the moment, but the Click event isn't a method, so this code is invalid. Does anyone know how I can ach...
Margit asked 26/4, 2009 at 7:6

3

Solved

Is it OK to raise a built-in exception with a custom text? or to raise a built-in warning also with custom text? The documentation reads: exception ValueError: Raised when a built-in operation ...
Rafaelita asked 1/2, 2010 at 22:36

4

I am rolling my own exception library for C and would like good examples to examine. So far, I have been looking at David Hanson's: http://drhanson.net/work/ But I know I've seen other ones avail...
Prophet asked 11/9, 2009 at 11:20

3

Solved

I am trying to raise a click event from User control and handle it on the containing page. The problem I have is, when I click the button 'imgstep1' on the user control, the code behind imgstep1_cl...
Chilly asked 11/9, 2009 at 12:4

1

I came across this question in a Microsoft Practice Test and I got confused. Here is the question: Which of the following C# code samples is the proper way to raise an event, assuming th...
Evite asked 28/8, 2009 at 4:9

5

Solved

I know that this probably doesn't really matter, but I would like to know what is correct. If a piece of code contains some version of throw new SomeKindOfException(). Do we say that this piece of...
Orta asked 12/6, 2009 at 9:28

© 2022 - 2024 — McMap. All rights reserved.